{-# 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.QuickSight.Types.Ingestion
-- 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.QuickSight.Types.Ingestion where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types.ErrorInfo
import Amazonka.QuickSight.Types.IngestionRequestSource
import Amazonka.QuickSight.Types.IngestionRequestType
import Amazonka.QuickSight.Types.IngestionStatus
import Amazonka.QuickSight.Types.QueueInfo
import Amazonka.QuickSight.Types.RowInfo

-- | Information about the SPICE ingestion for a dataset.
--
-- /See:/ 'newIngestion' smart constructor.
data Ingestion = Ingestion'
  { -- | Event source for this ingestion.
    Ingestion -> Maybe IngestionRequestSource
requestSource :: Prelude.Maybe IngestionRequestSource,
    Ingestion -> Maybe QueueInfo
queueInfo :: Prelude.Maybe QueueInfo,
    -- | The time that this ingestion took, measured in seconds.
    Ingestion -> Maybe Integer
ingestionTimeInSeconds :: Prelude.Maybe Prelude.Integer,
    -- | Type of this ingestion.
    Ingestion -> Maybe IngestionRequestType
requestType :: Prelude.Maybe IngestionRequestType,
    -- | The size of the data ingested, in bytes.
    Ingestion -> Maybe Integer
ingestionSizeInBytes :: Prelude.Maybe Prelude.Integer,
    Ingestion -> Maybe RowInfo
rowInfo :: Prelude.Maybe RowInfo,
    -- | Ingestion ID.
    Ingestion -> Maybe Text
ingestionId :: Prelude.Maybe Prelude.Text,
    -- | Error information for this ingestion.
    Ingestion -> Maybe ErrorInfo
errorInfo :: Prelude.Maybe ErrorInfo,
    -- | The Amazon Resource Name (ARN) of the resource.
    Ingestion -> Text
arn :: Prelude.Text,
    -- | Ingestion status.
    Ingestion -> IngestionStatus
ingestionStatus :: IngestionStatus,
    -- | The time that this ingestion started.
    Ingestion -> POSIX
createdTime :: Core.POSIX
  }
  deriving (Ingestion -> Ingestion -> Bool
(Ingestion -> Ingestion -> Bool)
-> (Ingestion -> Ingestion -> Bool) -> Eq Ingestion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Ingestion -> Ingestion -> Bool
$c/= :: Ingestion -> Ingestion -> Bool
== :: Ingestion -> Ingestion -> Bool
$c== :: Ingestion -> Ingestion -> Bool
Prelude.Eq, ReadPrec [Ingestion]
ReadPrec Ingestion
Int -> ReadS Ingestion
ReadS [Ingestion]
(Int -> ReadS Ingestion)
-> ReadS [Ingestion]
-> ReadPrec Ingestion
-> ReadPrec [Ingestion]
-> Read Ingestion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Ingestion]
$creadListPrec :: ReadPrec [Ingestion]
readPrec :: ReadPrec Ingestion
$creadPrec :: ReadPrec Ingestion
readList :: ReadS [Ingestion]
$creadList :: ReadS [Ingestion]
readsPrec :: Int -> ReadS Ingestion
$creadsPrec :: Int -> ReadS Ingestion
Prelude.Read, Int -> Ingestion -> ShowS
[Ingestion] -> ShowS
Ingestion -> String
(Int -> Ingestion -> ShowS)
-> (Ingestion -> String)
-> ([Ingestion] -> ShowS)
-> Show Ingestion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Ingestion] -> ShowS
$cshowList :: [Ingestion] -> ShowS
show :: Ingestion -> String
$cshow :: Ingestion -> String
showsPrec :: Int -> Ingestion -> ShowS
$cshowsPrec :: Int -> Ingestion -> ShowS
Prelude.Show, (forall x. Ingestion -> Rep Ingestion x)
-> (forall x. Rep Ingestion x -> Ingestion) -> Generic Ingestion
forall x. Rep Ingestion x -> Ingestion
forall x. Ingestion -> Rep Ingestion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Ingestion x -> Ingestion
$cfrom :: forall x. Ingestion -> Rep Ingestion x
Prelude.Generic)

-- |
-- Create a value of 'Ingestion' 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:
--
-- 'requestSource', 'ingestion_requestSource' - Event source for this ingestion.
--
-- 'queueInfo', 'ingestion_queueInfo' - Undocumented member.
--
-- 'ingestionTimeInSeconds', 'ingestion_ingestionTimeInSeconds' - The time that this ingestion took, measured in seconds.
--
-- 'requestType', 'ingestion_requestType' - Type of this ingestion.
--
-- 'ingestionSizeInBytes', 'ingestion_ingestionSizeInBytes' - The size of the data ingested, in bytes.
--
-- 'rowInfo', 'ingestion_rowInfo' - Undocumented member.
--
-- 'ingestionId', 'ingestion_ingestionId' - Ingestion ID.
--
-- 'errorInfo', 'ingestion_errorInfo' - Error information for this ingestion.
--
-- 'arn', 'ingestion_arn' - The Amazon Resource Name (ARN) of the resource.
--
-- 'ingestionStatus', 'ingestion_ingestionStatus' - Ingestion status.
--
-- 'createdTime', 'ingestion_createdTime' - The time that this ingestion started.
newIngestion ::
  -- | 'arn'
  Prelude.Text ->
  -- | 'ingestionStatus'
  IngestionStatus ->
  -- | 'createdTime'
  Prelude.UTCTime ->
  Ingestion
newIngestion :: Text -> IngestionStatus -> UTCTime -> Ingestion
newIngestion Text
pArn_ IngestionStatus
pIngestionStatus_ UTCTime
pCreatedTime_ =
  Ingestion' :: Maybe IngestionRequestSource
-> Maybe QueueInfo
-> Maybe Integer
-> Maybe IngestionRequestType
-> Maybe Integer
-> Maybe RowInfo
-> Maybe Text
-> Maybe ErrorInfo
-> Text
-> IngestionStatus
-> POSIX
-> Ingestion
Ingestion'
    { $sel:requestSource:Ingestion' :: Maybe IngestionRequestSource
requestSource = Maybe IngestionRequestSource
forall a. Maybe a
Prelude.Nothing,
      $sel:queueInfo:Ingestion' :: Maybe QueueInfo
queueInfo = Maybe QueueInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:ingestionTimeInSeconds:Ingestion' :: Maybe Integer
ingestionTimeInSeconds = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:requestType:Ingestion' :: Maybe IngestionRequestType
requestType = Maybe IngestionRequestType
forall a. Maybe a
Prelude.Nothing,
      $sel:ingestionSizeInBytes:Ingestion' :: Maybe Integer
ingestionSizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:rowInfo:Ingestion' :: Maybe RowInfo
rowInfo = Maybe RowInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:ingestionId:Ingestion' :: Maybe Text
ingestionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:errorInfo:Ingestion' :: Maybe ErrorInfo
errorInfo = Maybe ErrorInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Ingestion' :: Text
arn = Text
pArn_,
      $sel:ingestionStatus:Ingestion' :: IngestionStatus
ingestionStatus = IngestionStatus
pIngestionStatus_,
      $sel:createdTime:Ingestion' :: POSIX
createdTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreatedTime_
    }

-- | Event source for this ingestion.
ingestion_requestSource :: Lens.Lens' Ingestion (Prelude.Maybe IngestionRequestSource)
ingestion_requestSource :: (Maybe IngestionRequestSource -> f (Maybe IngestionRequestSource))
-> Ingestion -> f Ingestion
ingestion_requestSource = (Ingestion -> Maybe IngestionRequestSource)
-> (Ingestion -> Maybe IngestionRequestSource -> Ingestion)
-> Lens
     Ingestion
     Ingestion
     (Maybe IngestionRequestSource)
     (Maybe IngestionRequestSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ingestion' {Maybe IngestionRequestSource
requestSource :: Maybe IngestionRequestSource
$sel:requestSource:Ingestion' :: Ingestion -> Maybe IngestionRequestSource
requestSource} -> Maybe IngestionRequestSource
requestSource) (\s :: Ingestion
s@Ingestion' {} Maybe IngestionRequestSource
a -> Ingestion
s {$sel:requestSource:Ingestion' :: Maybe IngestionRequestSource
requestSource = Maybe IngestionRequestSource
a} :: Ingestion)

-- | Undocumented member.
ingestion_queueInfo :: Lens.Lens' Ingestion (Prelude.Maybe QueueInfo)
ingestion_queueInfo :: (Maybe QueueInfo -> f (Maybe QueueInfo))
-> Ingestion -> f Ingestion
ingestion_queueInfo = (Ingestion -> Maybe QueueInfo)
-> (Ingestion -> Maybe QueueInfo -> Ingestion)
-> Lens Ingestion Ingestion (Maybe QueueInfo) (Maybe QueueInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ingestion' {Maybe QueueInfo
queueInfo :: Maybe QueueInfo
$sel:queueInfo:Ingestion' :: Ingestion -> Maybe QueueInfo
queueInfo} -> Maybe QueueInfo
queueInfo) (\s :: Ingestion
s@Ingestion' {} Maybe QueueInfo
a -> Ingestion
s {$sel:queueInfo:Ingestion' :: Maybe QueueInfo
queueInfo = Maybe QueueInfo
a} :: Ingestion)

-- | The time that this ingestion took, measured in seconds.
ingestion_ingestionTimeInSeconds :: Lens.Lens' Ingestion (Prelude.Maybe Prelude.Integer)
ingestion_ingestionTimeInSeconds :: (Maybe Integer -> f (Maybe Integer)) -> Ingestion -> f Ingestion
ingestion_ingestionTimeInSeconds = (Ingestion -> Maybe Integer)
-> (Ingestion -> Maybe Integer -> Ingestion)
-> Lens Ingestion Ingestion (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ingestion' {Maybe Integer
ingestionTimeInSeconds :: Maybe Integer
$sel:ingestionTimeInSeconds:Ingestion' :: Ingestion -> Maybe Integer
ingestionTimeInSeconds} -> Maybe Integer
ingestionTimeInSeconds) (\s :: Ingestion
s@Ingestion' {} Maybe Integer
a -> Ingestion
s {$sel:ingestionTimeInSeconds:Ingestion' :: Maybe Integer
ingestionTimeInSeconds = Maybe Integer
a} :: Ingestion)

-- | Type of this ingestion.
ingestion_requestType :: Lens.Lens' Ingestion (Prelude.Maybe IngestionRequestType)
ingestion_requestType :: (Maybe IngestionRequestType -> f (Maybe IngestionRequestType))
-> Ingestion -> f Ingestion
ingestion_requestType = (Ingestion -> Maybe IngestionRequestType)
-> (Ingestion -> Maybe IngestionRequestType -> Ingestion)
-> Lens
     Ingestion
     Ingestion
     (Maybe IngestionRequestType)
     (Maybe IngestionRequestType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ingestion' {Maybe IngestionRequestType
requestType :: Maybe IngestionRequestType
$sel:requestType:Ingestion' :: Ingestion -> Maybe IngestionRequestType
requestType} -> Maybe IngestionRequestType
requestType) (\s :: Ingestion
s@Ingestion' {} Maybe IngestionRequestType
a -> Ingestion
s {$sel:requestType:Ingestion' :: Maybe IngestionRequestType
requestType = Maybe IngestionRequestType
a} :: Ingestion)

-- | The size of the data ingested, in bytes.
ingestion_ingestionSizeInBytes :: Lens.Lens' Ingestion (Prelude.Maybe Prelude.Integer)
ingestion_ingestionSizeInBytes :: (Maybe Integer -> f (Maybe Integer)) -> Ingestion -> f Ingestion
ingestion_ingestionSizeInBytes = (Ingestion -> Maybe Integer)
-> (Ingestion -> Maybe Integer -> Ingestion)
-> Lens Ingestion Ingestion (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ingestion' {Maybe Integer
ingestionSizeInBytes :: Maybe Integer
$sel:ingestionSizeInBytes:Ingestion' :: Ingestion -> Maybe Integer
ingestionSizeInBytes} -> Maybe Integer
ingestionSizeInBytes) (\s :: Ingestion
s@Ingestion' {} Maybe Integer
a -> Ingestion
s {$sel:ingestionSizeInBytes:Ingestion' :: Maybe Integer
ingestionSizeInBytes = Maybe Integer
a} :: Ingestion)

-- | Undocumented member.
ingestion_rowInfo :: Lens.Lens' Ingestion (Prelude.Maybe RowInfo)
ingestion_rowInfo :: (Maybe RowInfo -> f (Maybe RowInfo)) -> Ingestion -> f Ingestion
ingestion_rowInfo = (Ingestion -> Maybe RowInfo)
-> (Ingestion -> Maybe RowInfo -> Ingestion)
-> Lens Ingestion Ingestion (Maybe RowInfo) (Maybe RowInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ingestion' {Maybe RowInfo
rowInfo :: Maybe RowInfo
$sel:rowInfo:Ingestion' :: Ingestion -> Maybe RowInfo
rowInfo} -> Maybe RowInfo
rowInfo) (\s :: Ingestion
s@Ingestion' {} Maybe RowInfo
a -> Ingestion
s {$sel:rowInfo:Ingestion' :: Maybe RowInfo
rowInfo = Maybe RowInfo
a} :: Ingestion)

-- | Ingestion ID.
ingestion_ingestionId :: Lens.Lens' Ingestion (Prelude.Maybe Prelude.Text)
ingestion_ingestionId :: (Maybe Text -> f (Maybe Text)) -> Ingestion -> f Ingestion
ingestion_ingestionId = (Ingestion -> Maybe Text)
-> (Ingestion -> Maybe Text -> Ingestion)
-> Lens Ingestion Ingestion (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ingestion' {Maybe Text
ingestionId :: Maybe Text
$sel:ingestionId:Ingestion' :: Ingestion -> Maybe Text
ingestionId} -> Maybe Text
ingestionId) (\s :: Ingestion
s@Ingestion' {} Maybe Text
a -> Ingestion
s {$sel:ingestionId:Ingestion' :: Maybe Text
ingestionId = Maybe Text
a} :: Ingestion)

-- | Error information for this ingestion.
ingestion_errorInfo :: Lens.Lens' Ingestion (Prelude.Maybe ErrorInfo)
ingestion_errorInfo :: (Maybe ErrorInfo -> f (Maybe ErrorInfo))
-> Ingestion -> f Ingestion
ingestion_errorInfo = (Ingestion -> Maybe ErrorInfo)
-> (Ingestion -> Maybe ErrorInfo -> Ingestion)
-> Lens Ingestion Ingestion (Maybe ErrorInfo) (Maybe ErrorInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ingestion' {Maybe ErrorInfo
errorInfo :: Maybe ErrorInfo
$sel:errorInfo:Ingestion' :: Ingestion -> Maybe ErrorInfo
errorInfo} -> Maybe ErrorInfo
errorInfo) (\s :: Ingestion
s@Ingestion' {} Maybe ErrorInfo
a -> Ingestion
s {$sel:errorInfo:Ingestion' :: Maybe ErrorInfo
errorInfo = Maybe ErrorInfo
a} :: Ingestion)

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

-- | Ingestion status.
ingestion_ingestionStatus :: Lens.Lens' Ingestion IngestionStatus
ingestion_ingestionStatus :: (IngestionStatus -> f IngestionStatus) -> Ingestion -> f Ingestion
ingestion_ingestionStatus = (Ingestion -> IngestionStatus)
-> (Ingestion -> IngestionStatus -> Ingestion)
-> Lens Ingestion Ingestion IngestionStatus IngestionStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ingestion' {IngestionStatus
ingestionStatus :: IngestionStatus
$sel:ingestionStatus:Ingestion' :: Ingestion -> IngestionStatus
ingestionStatus} -> IngestionStatus
ingestionStatus) (\s :: Ingestion
s@Ingestion' {} IngestionStatus
a -> Ingestion
s {$sel:ingestionStatus:Ingestion' :: IngestionStatus
ingestionStatus = IngestionStatus
a} :: Ingestion)

-- | The time that this ingestion started.
ingestion_createdTime :: Lens.Lens' Ingestion Prelude.UTCTime
ingestion_createdTime :: (UTCTime -> f UTCTime) -> Ingestion -> f Ingestion
ingestion_createdTime = (Ingestion -> POSIX)
-> (Ingestion -> POSIX -> Ingestion)
-> Lens Ingestion Ingestion POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Ingestion' {POSIX
createdTime :: POSIX
$sel:createdTime:Ingestion' :: Ingestion -> POSIX
createdTime} -> POSIX
createdTime) (\s :: Ingestion
s@Ingestion' {} POSIX
a -> Ingestion
s {$sel:createdTime:Ingestion' :: POSIX
createdTime = POSIX
a} :: Ingestion) ((POSIX -> f POSIX) -> Ingestion -> f Ingestion)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> Ingestion
-> f Ingestion
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Core.FromJSON Ingestion where
  parseJSON :: Value -> Parser Ingestion
parseJSON =
    String -> (Object -> Parser Ingestion) -> Value -> Parser Ingestion
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Ingestion"
      ( \Object
x ->
          Maybe IngestionRequestSource
-> Maybe QueueInfo
-> Maybe Integer
-> Maybe IngestionRequestType
-> Maybe Integer
-> Maybe RowInfo
-> Maybe Text
-> Maybe ErrorInfo
-> Text
-> IngestionStatus
-> POSIX
-> Ingestion
Ingestion'
            (Maybe IngestionRequestSource
 -> Maybe QueueInfo
 -> Maybe Integer
 -> Maybe IngestionRequestType
 -> Maybe Integer
 -> Maybe RowInfo
 -> Maybe Text
 -> Maybe ErrorInfo
 -> Text
 -> IngestionStatus
 -> POSIX
 -> Ingestion)
-> Parser (Maybe IngestionRequestSource)
-> Parser
     (Maybe QueueInfo
      -> Maybe Integer
      -> Maybe IngestionRequestType
      -> Maybe Integer
      -> Maybe RowInfo
      -> Maybe Text
      -> Maybe ErrorInfo
      -> Text
      -> IngestionStatus
      -> POSIX
      -> Ingestion)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe IngestionRequestSource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RequestSource")
            Parser
  (Maybe QueueInfo
   -> Maybe Integer
   -> Maybe IngestionRequestType
   -> Maybe Integer
   -> Maybe RowInfo
   -> Maybe Text
   -> Maybe ErrorInfo
   -> Text
   -> IngestionStatus
   -> POSIX
   -> Ingestion)
-> Parser (Maybe QueueInfo)
-> Parser
     (Maybe Integer
      -> Maybe IngestionRequestType
      -> Maybe Integer
      -> Maybe RowInfo
      -> Maybe Text
      -> Maybe ErrorInfo
      -> Text
      -> IngestionStatus
      -> POSIX
      -> Ingestion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe QueueInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"QueueInfo")
            Parser
  (Maybe Integer
   -> Maybe IngestionRequestType
   -> Maybe Integer
   -> Maybe RowInfo
   -> Maybe Text
   -> Maybe ErrorInfo
   -> Text
   -> IngestionStatus
   -> POSIX
   -> Ingestion)
-> Parser (Maybe Integer)
-> Parser
     (Maybe IngestionRequestType
      -> Maybe Integer
      -> Maybe RowInfo
      -> Maybe Text
      -> Maybe ErrorInfo
      -> Text
      -> IngestionStatus
      -> POSIX
      -> Ingestion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IngestionTimeInSeconds")
            Parser
  (Maybe IngestionRequestType
   -> Maybe Integer
   -> Maybe RowInfo
   -> Maybe Text
   -> Maybe ErrorInfo
   -> Text
   -> IngestionStatus
   -> POSIX
   -> Ingestion)
-> Parser (Maybe IngestionRequestType)
-> Parser
     (Maybe Integer
      -> Maybe RowInfo
      -> Maybe Text
      -> Maybe ErrorInfo
      -> Text
      -> IngestionStatus
      -> POSIX
      -> Ingestion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe IngestionRequestType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RequestType")
            Parser
  (Maybe Integer
   -> Maybe RowInfo
   -> Maybe Text
   -> Maybe ErrorInfo
   -> Text
   -> IngestionStatus
   -> POSIX
   -> Ingestion)
-> Parser (Maybe Integer)
-> Parser
     (Maybe RowInfo
      -> Maybe Text
      -> Maybe ErrorInfo
      -> Text
      -> IngestionStatus
      -> POSIX
      -> Ingestion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IngestionSizeInBytes")
            Parser
  (Maybe RowInfo
   -> Maybe Text
   -> Maybe ErrorInfo
   -> Text
   -> IngestionStatus
   -> POSIX
   -> Ingestion)
-> Parser (Maybe RowInfo)
-> Parser
     (Maybe Text
      -> Maybe ErrorInfo
      -> Text
      -> IngestionStatus
      -> POSIX
      -> Ingestion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RowInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RowInfo")
            Parser
  (Maybe Text
   -> Maybe ErrorInfo
   -> Text
   -> IngestionStatus
   -> POSIX
   -> Ingestion)
-> Parser (Maybe Text)
-> Parser
     (Maybe ErrorInfo -> Text -> IngestionStatus -> POSIX -> Ingestion)
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
"IngestionId")
            Parser
  (Maybe ErrorInfo -> Text -> IngestionStatus -> POSIX -> Ingestion)
-> Parser (Maybe ErrorInfo)
-> Parser (Text -> IngestionStatus -> POSIX -> Ingestion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ErrorInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ErrorInfo")
            Parser (Text -> IngestionStatus -> POSIX -> Ingestion)
-> Parser Text -> Parser (IngestionStatus -> POSIX -> Ingestion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Arn")
            Parser (IngestionStatus -> POSIX -> Ingestion)
-> Parser IngestionStatus -> Parser (POSIX -> Ingestion)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser IngestionStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"IngestionStatus")
            Parser (POSIX -> Ingestion) -> Parser POSIX -> Parser Ingestion
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreatedTime")
      )

instance Prelude.Hashable Ingestion

instance Prelude.NFData Ingestion