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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types.DestinationInfo
import Amazonka.Lightsail.Types.ExportSnapshotRecordSourceInfo
import Amazonka.Lightsail.Types.RecordState
import Amazonka.Lightsail.Types.ResourceLocation
import Amazonka.Lightsail.Types.ResourceType
import qualified Amazonka.Prelude as Prelude

-- | Describes an export snapshot record.
--
-- /See:/ 'newExportSnapshotRecord' smart constructor.
data ExportSnapshotRecord = ExportSnapshotRecord'
  { -- | The state of the export snapshot record.
    ExportSnapshotRecord -> Maybe RecordState
state :: Prelude.Maybe RecordState,
    -- | A list of objects describing the destination of the export snapshot
    -- record.
    ExportSnapshotRecord -> Maybe DestinationInfo
destinationInfo :: Prelude.Maybe DestinationInfo,
    -- | The Lightsail resource type (e.g., @ExportSnapshotRecord@).
    ExportSnapshotRecord -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
    -- | The Amazon Resource Name (ARN) of the export snapshot record.
    ExportSnapshotRecord -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The date when the export snapshot record was created.
    ExportSnapshotRecord -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The AWS Region and Availability Zone where the export snapshot record is
    -- located.
    ExportSnapshotRecord -> Maybe ResourceLocation
location :: Prelude.Maybe ResourceLocation,
    -- | The export snapshot record name.
    ExportSnapshotRecord -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | A list of objects describing the source of the export snapshot record.
    ExportSnapshotRecord -> Maybe ExportSnapshotRecordSourceInfo
sourceInfo :: Prelude.Maybe ExportSnapshotRecordSourceInfo
  }
  deriving (ExportSnapshotRecord -> ExportSnapshotRecord -> Bool
(ExportSnapshotRecord -> ExportSnapshotRecord -> Bool)
-> (ExportSnapshotRecord -> ExportSnapshotRecord -> Bool)
-> Eq ExportSnapshotRecord
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportSnapshotRecord -> ExportSnapshotRecord -> Bool
$c/= :: ExportSnapshotRecord -> ExportSnapshotRecord -> Bool
== :: ExportSnapshotRecord -> ExportSnapshotRecord -> Bool
$c== :: ExportSnapshotRecord -> ExportSnapshotRecord -> Bool
Prelude.Eq, ReadPrec [ExportSnapshotRecord]
ReadPrec ExportSnapshotRecord
Int -> ReadS ExportSnapshotRecord
ReadS [ExportSnapshotRecord]
(Int -> ReadS ExportSnapshotRecord)
-> ReadS [ExportSnapshotRecord]
-> ReadPrec ExportSnapshotRecord
-> ReadPrec [ExportSnapshotRecord]
-> Read ExportSnapshotRecord
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportSnapshotRecord]
$creadListPrec :: ReadPrec [ExportSnapshotRecord]
readPrec :: ReadPrec ExportSnapshotRecord
$creadPrec :: ReadPrec ExportSnapshotRecord
readList :: ReadS [ExportSnapshotRecord]
$creadList :: ReadS [ExportSnapshotRecord]
readsPrec :: Int -> ReadS ExportSnapshotRecord
$creadsPrec :: Int -> ReadS ExportSnapshotRecord
Prelude.Read, Int -> ExportSnapshotRecord -> ShowS
[ExportSnapshotRecord] -> ShowS
ExportSnapshotRecord -> String
(Int -> ExportSnapshotRecord -> ShowS)
-> (ExportSnapshotRecord -> String)
-> ([ExportSnapshotRecord] -> ShowS)
-> Show ExportSnapshotRecord
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportSnapshotRecord] -> ShowS
$cshowList :: [ExportSnapshotRecord] -> ShowS
show :: ExportSnapshotRecord -> String
$cshow :: ExportSnapshotRecord -> String
showsPrec :: Int -> ExportSnapshotRecord -> ShowS
$cshowsPrec :: Int -> ExportSnapshotRecord -> ShowS
Prelude.Show, (forall x. ExportSnapshotRecord -> Rep ExportSnapshotRecord x)
-> (forall x. Rep ExportSnapshotRecord x -> ExportSnapshotRecord)
-> Generic ExportSnapshotRecord
forall x. Rep ExportSnapshotRecord x -> ExportSnapshotRecord
forall x. ExportSnapshotRecord -> Rep ExportSnapshotRecord x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExportSnapshotRecord x -> ExportSnapshotRecord
$cfrom :: forall x. ExportSnapshotRecord -> Rep ExportSnapshotRecord x
Prelude.Generic)

-- |
-- Create a value of 'ExportSnapshotRecord' 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:
--
-- 'state', 'exportSnapshotRecord_state' - The state of the export snapshot record.
--
-- 'destinationInfo', 'exportSnapshotRecord_destinationInfo' - A list of objects describing the destination of the export snapshot
-- record.
--
-- 'resourceType', 'exportSnapshotRecord_resourceType' - The Lightsail resource type (e.g., @ExportSnapshotRecord@).
--
-- 'arn', 'exportSnapshotRecord_arn' - The Amazon Resource Name (ARN) of the export snapshot record.
--
-- 'createdAt', 'exportSnapshotRecord_createdAt' - The date when the export snapshot record was created.
--
-- 'location', 'exportSnapshotRecord_location' - The AWS Region and Availability Zone where the export snapshot record is
-- located.
--
-- 'name', 'exportSnapshotRecord_name' - The export snapshot record name.
--
-- 'sourceInfo', 'exportSnapshotRecord_sourceInfo' - A list of objects describing the source of the export snapshot record.
newExportSnapshotRecord ::
  ExportSnapshotRecord
newExportSnapshotRecord :: ExportSnapshotRecord
newExportSnapshotRecord =
  ExportSnapshotRecord' :: Maybe RecordState
-> Maybe DestinationInfo
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe ExportSnapshotRecordSourceInfo
-> ExportSnapshotRecord
ExportSnapshotRecord'
    { $sel:state:ExportSnapshotRecord' :: Maybe RecordState
state = Maybe RecordState
forall a. Maybe a
Prelude.Nothing,
      $sel:destinationInfo:ExportSnapshotRecord' :: Maybe DestinationInfo
destinationInfo = Maybe DestinationInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:ExportSnapshotRecord' :: Maybe ResourceType
resourceType = Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ExportSnapshotRecord' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:ExportSnapshotRecord' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:location:ExportSnapshotRecord' :: Maybe ResourceLocation
location = Maybe ResourceLocation
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ExportSnapshotRecord' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceInfo:ExportSnapshotRecord' :: Maybe ExportSnapshotRecordSourceInfo
sourceInfo = Maybe ExportSnapshotRecordSourceInfo
forall a. Maybe a
Prelude.Nothing
    }

-- | The state of the export snapshot record.
exportSnapshotRecord_state :: Lens.Lens' ExportSnapshotRecord (Prelude.Maybe RecordState)
exportSnapshotRecord_state :: (Maybe RecordState -> f (Maybe RecordState))
-> ExportSnapshotRecord -> f ExportSnapshotRecord
exportSnapshotRecord_state = (ExportSnapshotRecord -> Maybe RecordState)
-> (ExportSnapshotRecord
    -> Maybe RecordState -> ExportSnapshotRecord)
-> Lens
     ExportSnapshotRecord
     ExportSnapshotRecord
     (Maybe RecordState)
     (Maybe RecordState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportSnapshotRecord' {Maybe RecordState
state :: Maybe RecordState
$sel:state:ExportSnapshotRecord' :: ExportSnapshotRecord -> Maybe RecordState
state} -> Maybe RecordState
state) (\s :: ExportSnapshotRecord
s@ExportSnapshotRecord' {} Maybe RecordState
a -> ExportSnapshotRecord
s {$sel:state:ExportSnapshotRecord' :: Maybe RecordState
state = Maybe RecordState
a} :: ExportSnapshotRecord)

-- | A list of objects describing the destination of the export snapshot
-- record.
exportSnapshotRecord_destinationInfo :: Lens.Lens' ExportSnapshotRecord (Prelude.Maybe DestinationInfo)
exportSnapshotRecord_destinationInfo :: (Maybe DestinationInfo -> f (Maybe DestinationInfo))
-> ExportSnapshotRecord -> f ExportSnapshotRecord
exportSnapshotRecord_destinationInfo = (ExportSnapshotRecord -> Maybe DestinationInfo)
-> (ExportSnapshotRecord
    -> Maybe DestinationInfo -> ExportSnapshotRecord)
-> Lens
     ExportSnapshotRecord
     ExportSnapshotRecord
     (Maybe DestinationInfo)
     (Maybe DestinationInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportSnapshotRecord' {Maybe DestinationInfo
destinationInfo :: Maybe DestinationInfo
$sel:destinationInfo:ExportSnapshotRecord' :: ExportSnapshotRecord -> Maybe DestinationInfo
destinationInfo} -> Maybe DestinationInfo
destinationInfo) (\s :: ExportSnapshotRecord
s@ExportSnapshotRecord' {} Maybe DestinationInfo
a -> ExportSnapshotRecord
s {$sel:destinationInfo:ExportSnapshotRecord' :: Maybe DestinationInfo
destinationInfo = Maybe DestinationInfo
a} :: ExportSnapshotRecord)

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

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

-- | The date when the export snapshot record was created.
exportSnapshotRecord_createdAt :: Lens.Lens' ExportSnapshotRecord (Prelude.Maybe Prelude.UTCTime)
exportSnapshotRecord_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ExportSnapshotRecord -> f ExportSnapshotRecord
exportSnapshotRecord_createdAt = (ExportSnapshotRecord -> Maybe POSIX)
-> (ExportSnapshotRecord -> Maybe POSIX -> ExportSnapshotRecord)
-> Lens
     ExportSnapshotRecord
     ExportSnapshotRecord
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportSnapshotRecord' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:ExportSnapshotRecord' :: ExportSnapshotRecord -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: ExportSnapshotRecord
s@ExportSnapshotRecord' {} Maybe POSIX
a -> ExportSnapshotRecord
s {$sel:createdAt:ExportSnapshotRecord' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: ExportSnapshotRecord) ((Maybe POSIX -> f (Maybe POSIX))
 -> ExportSnapshotRecord -> f ExportSnapshotRecord)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ExportSnapshotRecord
-> f ExportSnapshotRecord
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 AWS Region and Availability Zone where the export snapshot record is
-- located.
exportSnapshotRecord_location :: Lens.Lens' ExportSnapshotRecord (Prelude.Maybe ResourceLocation)
exportSnapshotRecord_location :: (Maybe ResourceLocation -> f (Maybe ResourceLocation))
-> ExportSnapshotRecord -> f ExportSnapshotRecord
exportSnapshotRecord_location = (ExportSnapshotRecord -> Maybe ResourceLocation)
-> (ExportSnapshotRecord
    -> Maybe ResourceLocation -> ExportSnapshotRecord)
-> Lens
     ExportSnapshotRecord
     ExportSnapshotRecord
     (Maybe ResourceLocation)
     (Maybe ResourceLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportSnapshotRecord' {Maybe ResourceLocation
location :: Maybe ResourceLocation
$sel:location:ExportSnapshotRecord' :: ExportSnapshotRecord -> Maybe ResourceLocation
location} -> Maybe ResourceLocation
location) (\s :: ExportSnapshotRecord
s@ExportSnapshotRecord' {} Maybe ResourceLocation
a -> ExportSnapshotRecord
s {$sel:location:ExportSnapshotRecord' :: Maybe ResourceLocation
location = Maybe ResourceLocation
a} :: ExportSnapshotRecord)

-- | The export snapshot record name.
exportSnapshotRecord_name :: Lens.Lens' ExportSnapshotRecord (Prelude.Maybe Prelude.Text)
exportSnapshotRecord_name :: (Maybe Text -> f (Maybe Text))
-> ExportSnapshotRecord -> f ExportSnapshotRecord
exportSnapshotRecord_name = (ExportSnapshotRecord -> Maybe Text)
-> (ExportSnapshotRecord -> Maybe Text -> ExportSnapshotRecord)
-> Lens
     ExportSnapshotRecord ExportSnapshotRecord (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportSnapshotRecord' {Maybe Text
name :: Maybe Text
$sel:name:ExportSnapshotRecord' :: ExportSnapshotRecord -> Maybe Text
name} -> Maybe Text
name) (\s :: ExportSnapshotRecord
s@ExportSnapshotRecord' {} Maybe Text
a -> ExportSnapshotRecord
s {$sel:name:ExportSnapshotRecord' :: Maybe Text
name = Maybe Text
a} :: ExportSnapshotRecord)

-- | A list of objects describing the source of the export snapshot record.
exportSnapshotRecord_sourceInfo :: Lens.Lens' ExportSnapshotRecord (Prelude.Maybe ExportSnapshotRecordSourceInfo)
exportSnapshotRecord_sourceInfo :: (Maybe ExportSnapshotRecordSourceInfo
 -> f (Maybe ExportSnapshotRecordSourceInfo))
-> ExportSnapshotRecord -> f ExportSnapshotRecord
exportSnapshotRecord_sourceInfo = (ExportSnapshotRecord -> Maybe ExportSnapshotRecordSourceInfo)
-> (ExportSnapshotRecord
    -> Maybe ExportSnapshotRecordSourceInfo -> ExportSnapshotRecord)
-> Lens
     ExportSnapshotRecord
     ExportSnapshotRecord
     (Maybe ExportSnapshotRecordSourceInfo)
     (Maybe ExportSnapshotRecordSourceInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportSnapshotRecord' {Maybe ExportSnapshotRecordSourceInfo
sourceInfo :: Maybe ExportSnapshotRecordSourceInfo
$sel:sourceInfo:ExportSnapshotRecord' :: ExportSnapshotRecord -> Maybe ExportSnapshotRecordSourceInfo
sourceInfo} -> Maybe ExportSnapshotRecordSourceInfo
sourceInfo) (\s :: ExportSnapshotRecord
s@ExportSnapshotRecord' {} Maybe ExportSnapshotRecordSourceInfo
a -> ExportSnapshotRecord
s {$sel:sourceInfo:ExportSnapshotRecord' :: Maybe ExportSnapshotRecordSourceInfo
sourceInfo = Maybe ExportSnapshotRecordSourceInfo
a} :: ExportSnapshotRecord)

instance Core.FromJSON ExportSnapshotRecord where
  parseJSON :: Value -> Parser ExportSnapshotRecord
parseJSON =
    String
-> (Object -> Parser ExportSnapshotRecord)
-> Value
-> Parser ExportSnapshotRecord
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ExportSnapshotRecord"
      ( \Object
x ->
          Maybe RecordState
-> Maybe DestinationInfo
-> Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe Text
-> Maybe ExportSnapshotRecordSourceInfo
-> ExportSnapshotRecord
ExportSnapshotRecord'
            (Maybe RecordState
 -> Maybe DestinationInfo
 -> Maybe ResourceType
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe ResourceLocation
 -> Maybe Text
 -> Maybe ExportSnapshotRecordSourceInfo
 -> ExportSnapshotRecord)
-> Parser (Maybe RecordState)
-> Parser
     (Maybe DestinationInfo
      -> Maybe ResourceType
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe ExportSnapshotRecordSourceInfo
      -> ExportSnapshotRecord)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe RecordState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
            Parser
  (Maybe DestinationInfo
   -> Maybe ResourceType
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe ExportSnapshotRecordSourceInfo
   -> ExportSnapshotRecord)
-> Parser (Maybe DestinationInfo)
-> Parser
     (Maybe ResourceType
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe ExportSnapshotRecordSourceInfo
      -> ExportSnapshotRecord)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DestinationInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"destinationInfo")
            Parser
  (Maybe ResourceType
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe ExportSnapshotRecordSourceInfo
   -> ExportSnapshotRecord)
-> Parser (Maybe ResourceType)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe ExportSnapshotRecordSourceInfo
      -> ExportSnapshotRecord)
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 POSIX
   -> Maybe ResourceLocation
   -> Maybe Text
   -> Maybe ExportSnapshotRecordSourceInfo
   -> ExportSnapshotRecord)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe ResourceLocation
      -> Maybe Text
      -> Maybe ExportSnapshotRecordSourceInfo
      -> ExportSnapshotRecord)
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 ExportSnapshotRecordSourceInfo
   -> ExportSnapshotRecord)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe ResourceLocation
      -> Maybe Text
      -> Maybe ExportSnapshotRecordSourceInfo
      -> ExportSnapshotRecord)
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 ExportSnapshotRecordSourceInfo
   -> ExportSnapshotRecord)
-> Parser (Maybe ResourceLocation)
-> Parser
     (Maybe Text
      -> Maybe ExportSnapshotRecordSourceInfo -> ExportSnapshotRecord)
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 ExportSnapshotRecordSourceInfo -> ExportSnapshotRecord)
-> Parser (Maybe Text)
-> Parser
     (Maybe ExportSnapshotRecordSourceInfo -> ExportSnapshotRecord)
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 ExportSnapshotRecordSourceInfo -> ExportSnapshotRecord)
-> Parser (Maybe ExportSnapshotRecordSourceInfo)
-> Parser ExportSnapshotRecord
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ExportSnapshotRecordSourceInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sourceInfo")
      )

instance Prelude.Hashable ExportSnapshotRecord

instance Prelude.NFData ExportSnapshotRecord