{-# 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.MachineLearning.Types.DataSource
-- 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.MachineLearning.Types.DataSource where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MachineLearning.Types.EntityStatus
import Amazonka.MachineLearning.Types.RDSMetadata
import Amazonka.MachineLearning.Types.RedshiftMetadata
import qualified Amazonka.Prelude as Prelude

-- | Represents the output of the @GetDataSource@ operation.
--
-- The content consists of the detailed metadata and data file information
-- and the current status of the @DataSource@.
--
-- /See:/ 'newDataSource' smart constructor.
data DataSource = DataSource'
  { -- | The current status of the @DataSource@. This element can have one of the
    -- following values:
    --
    -- -   PENDING - Amazon Machine Learning (Amazon ML) submitted a request to
    --     create a @DataSource@.
    --
    -- -   INPROGRESS - The creation process is underway.
    --
    -- -   FAILED - The request to create a @DataSource@ did not run to
    --     completion. It is not usable.
    --
    -- -   COMPLETED - The creation process completed successfully.
    --
    -- -   DELETED - The @DataSource@ is marked as deleted. It is not usable.
    DataSource -> Maybe EntityStatus
status :: Prelude.Maybe EntityStatus,
    -- | The number of data files referenced by the @DataSource@.
    DataSource -> Maybe Integer
numberOfFiles :: Prelude.Maybe Prelude.Integer,
    -- | The time of the most recent edit to the @BatchPrediction@. The time is
    -- expressed in epoch time.
    DataSource -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | The time that the @DataSource@ was created. The time is expressed in
    -- epoch time.
    DataSource -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    DataSource -> Maybe Integer
computeTime :: Prelude.Maybe Prelude.Integer,
    -- | The ID that is assigned to the @DataSource@ during creation.
    DataSource -> Maybe Text
dataSourceId :: Prelude.Maybe Prelude.Text,
    DataSource -> Maybe RDSMetadata
rDSMetadata :: Prelude.Maybe RDSMetadata,
    -- | The total number of observations contained in the data files that the
    -- @DataSource@ references.
    DataSource -> Maybe Integer
dataSizeInBytes :: Prelude.Maybe Prelude.Integer,
    DataSource -> Maybe POSIX
startedAt :: Prelude.Maybe Core.POSIX,
    DataSource -> Maybe POSIX
finishedAt :: Prelude.Maybe Core.POSIX,
    -- | The AWS user account from which the @DataSource@ was created. The
    -- account type can be either an AWS root account or an AWS Identity and
    -- Access Management (IAM) user account.
    DataSource -> Maybe Text
createdByIamUser :: Prelude.Maybe Prelude.Text,
    -- | A user-supplied name or description of the @DataSource@.
    DataSource -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The location and name of the data in Amazon Simple Storage Service
    -- (Amazon S3) that is used by a @DataSource@.
    DataSource -> Maybe Text
dataLocationS3 :: Prelude.Maybe Prelude.Text,
    -- | The parameter is @true@ if statistics need to be generated from the
    -- observation data.
    DataSource -> Maybe Bool
computeStatistics :: Prelude.Maybe Prelude.Bool,
    -- | A description of the most recent details about creating the
    -- @DataSource@.
    DataSource -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    DataSource -> Maybe RedshiftMetadata
redshiftMetadata :: Prelude.Maybe RedshiftMetadata,
    -- | A JSON string that represents the splitting and rearrangement
    -- requirement used when this @DataSource@ was created.
    DataSource -> Maybe Text
dataRearrangement :: Prelude.Maybe Prelude.Text,
    DataSource -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text
  }
  deriving (DataSource -> DataSource -> Bool
(DataSource -> DataSource -> Bool)
-> (DataSource -> DataSource -> Bool) -> Eq DataSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataSource -> DataSource -> Bool
$c/= :: DataSource -> DataSource -> Bool
== :: DataSource -> DataSource -> Bool
$c== :: DataSource -> DataSource -> Bool
Prelude.Eq, ReadPrec [DataSource]
ReadPrec DataSource
Int -> ReadS DataSource
ReadS [DataSource]
(Int -> ReadS DataSource)
-> ReadS [DataSource]
-> ReadPrec DataSource
-> ReadPrec [DataSource]
-> Read DataSource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DataSource]
$creadListPrec :: ReadPrec [DataSource]
readPrec :: ReadPrec DataSource
$creadPrec :: ReadPrec DataSource
readList :: ReadS [DataSource]
$creadList :: ReadS [DataSource]
readsPrec :: Int -> ReadS DataSource
$creadsPrec :: Int -> ReadS DataSource
Prelude.Read, Int -> DataSource -> ShowS
[DataSource] -> ShowS
DataSource -> String
(Int -> DataSource -> ShowS)
-> (DataSource -> String)
-> ([DataSource] -> ShowS)
-> Show DataSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataSource] -> ShowS
$cshowList :: [DataSource] -> ShowS
show :: DataSource -> String
$cshow :: DataSource -> String
showsPrec :: Int -> DataSource -> ShowS
$cshowsPrec :: Int -> DataSource -> ShowS
Prelude.Show, (forall x. DataSource -> Rep DataSource x)
-> (forall x. Rep DataSource x -> DataSource) -> Generic DataSource
forall x. Rep DataSource x -> DataSource
forall x. DataSource -> Rep DataSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DataSource x -> DataSource
$cfrom :: forall x. DataSource -> Rep DataSource x
Prelude.Generic)

-- |
-- Create a value of 'DataSource' 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:
--
-- 'status', 'dataSource_status' - The current status of the @DataSource@. This element can have one of the
-- following values:
--
-- -   PENDING - Amazon Machine Learning (Amazon ML) submitted a request to
--     create a @DataSource@.
--
-- -   INPROGRESS - The creation process is underway.
--
-- -   FAILED - The request to create a @DataSource@ did not run to
--     completion. It is not usable.
--
-- -   COMPLETED - The creation process completed successfully.
--
-- -   DELETED - The @DataSource@ is marked as deleted. It is not usable.
--
-- 'numberOfFiles', 'dataSource_numberOfFiles' - The number of data files referenced by the @DataSource@.
--
-- 'lastUpdatedAt', 'dataSource_lastUpdatedAt' - The time of the most recent edit to the @BatchPrediction@. The time is
-- expressed in epoch time.
--
-- 'createdAt', 'dataSource_createdAt' - The time that the @DataSource@ was created. The time is expressed in
-- epoch time.
--
-- 'computeTime', 'dataSource_computeTime' - Undocumented member.
--
-- 'dataSourceId', 'dataSource_dataSourceId' - The ID that is assigned to the @DataSource@ during creation.
--
-- 'rDSMetadata', 'dataSource_rDSMetadata' - Undocumented member.
--
-- 'dataSizeInBytes', 'dataSource_dataSizeInBytes' - The total number of observations contained in the data files that the
-- @DataSource@ references.
--
-- 'startedAt', 'dataSource_startedAt' - Undocumented member.
--
-- 'finishedAt', 'dataSource_finishedAt' - Undocumented member.
--
-- 'createdByIamUser', 'dataSource_createdByIamUser' - The AWS user account from which the @DataSource@ was created. The
-- account type can be either an AWS root account or an AWS Identity and
-- Access Management (IAM) user account.
--
-- 'name', 'dataSource_name' - A user-supplied name or description of the @DataSource@.
--
-- 'dataLocationS3', 'dataSource_dataLocationS3' - The location and name of the data in Amazon Simple Storage Service
-- (Amazon S3) that is used by a @DataSource@.
--
-- 'computeStatistics', 'dataSource_computeStatistics' - The parameter is @true@ if statistics need to be generated from the
-- observation data.
--
-- 'message', 'dataSource_message' - A description of the most recent details about creating the
-- @DataSource@.
--
-- 'redshiftMetadata', 'dataSource_redshiftMetadata' - Undocumented member.
--
-- 'dataRearrangement', 'dataSource_dataRearrangement' - A JSON string that represents the splitting and rearrangement
-- requirement used when this @DataSource@ was created.
--
-- 'roleARN', 'dataSource_roleARN' - Undocumented member.
newDataSource ::
  DataSource
newDataSource :: DataSource
newDataSource =
  DataSource' :: Maybe EntityStatus
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe RDSMetadata
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe RedshiftMetadata
-> Maybe Text
-> Maybe Text
-> DataSource
DataSource'
    { $sel:status:DataSource' :: Maybe EntityStatus
status = Maybe EntityStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:numberOfFiles:DataSource' :: Maybe Integer
numberOfFiles = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedAt:DataSource' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:DataSource' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:computeTime:DataSource' :: Maybe Integer
computeTime = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSourceId:DataSource' :: Maybe Text
dataSourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:rDSMetadata:DataSource' :: Maybe RDSMetadata
rDSMetadata = Maybe RDSMetadata
forall a. Maybe a
Prelude.Nothing,
      $sel:dataSizeInBytes:DataSource' :: Maybe Integer
dataSizeInBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:startedAt:DataSource' :: Maybe POSIX
startedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:finishedAt:DataSource' :: Maybe POSIX
finishedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdByIamUser:DataSource' :: Maybe Text
createdByIamUser = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DataSource' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dataLocationS3:DataSource' :: Maybe Text
dataLocationS3 = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:computeStatistics:DataSource' :: Maybe Bool
computeStatistics = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:message:DataSource' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:redshiftMetadata:DataSource' :: Maybe RedshiftMetadata
redshiftMetadata = Maybe RedshiftMetadata
forall a. Maybe a
Prelude.Nothing,
      $sel:dataRearrangement:DataSource' :: Maybe Text
dataRearrangement = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:roleARN:DataSource' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The current status of the @DataSource@. This element can have one of the
-- following values:
--
-- -   PENDING - Amazon Machine Learning (Amazon ML) submitted a request to
--     create a @DataSource@.
--
-- -   INPROGRESS - The creation process is underway.
--
-- -   FAILED - The request to create a @DataSource@ did not run to
--     completion. It is not usable.
--
-- -   COMPLETED - The creation process completed successfully.
--
-- -   DELETED - The @DataSource@ is marked as deleted. It is not usable.
dataSource_status :: Lens.Lens' DataSource (Prelude.Maybe EntityStatus)
dataSource_status :: (Maybe EntityStatus -> f (Maybe EntityStatus))
-> DataSource -> f DataSource
dataSource_status = (DataSource -> Maybe EntityStatus)
-> (DataSource -> Maybe EntityStatus -> DataSource)
-> Lens
     DataSource DataSource (Maybe EntityStatus) (Maybe EntityStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe EntityStatus
status :: Maybe EntityStatus
$sel:status:DataSource' :: DataSource -> Maybe EntityStatus
status} -> Maybe EntityStatus
status) (\s :: DataSource
s@DataSource' {} Maybe EntityStatus
a -> DataSource
s {$sel:status:DataSource' :: Maybe EntityStatus
status = Maybe EntityStatus
a} :: DataSource)

-- | The number of data files referenced by the @DataSource@.
dataSource_numberOfFiles :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Integer)
dataSource_numberOfFiles :: (Maybe Integer -> f (Maybe Integer)) -> DataSource -> f DataSource
dataSource_numberOfFiles = (DataSource -> Maybe Integer)
-> (DataSource -> Maybe Integer -> DataSource)
-> Lens DataSource DataSource (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Integer
numberOfFiles :: Maybe Integer
$sel:numberOfFiles:DataSource' :: DataSource -> Maybe Integer
numberOfFiles} -> Maybe Integer
numberOfFiles) (\s :: DataSource
s@DataSource' {} Maybe Integer
a -> DataSource
s {$sel:numberOfFiles:DataSource' :: Maybe Integer
numberOfFiles = Maybe Integer
a} :: DataSource)

-- | The time of the most recent edit to the @BatchPrediction@. The time is
-- expressed in epoch time.
dataSource_lastUpdatedAt :: Lens.Lens' DataSource (Prelude.Maybe Prelude.UTCTime)
dataSource_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> DataSource -> f DataSource
dataSource_lastUpdatedAt = (DataSource -> Maybe POSIX)
-> (DataSource -> Maybe POSIX -> DataSource)
-> Lens DataSource DataSource (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:DataSource' :: DataSource -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: DataSource
s@DataSource' {} Maybe POSIX
a -> DataSource
s {$sel:lastUpdatedAt:DataSource' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: DataSource) ((Maybe POSIX -> f (Maybe POSIX)) -> DataSource -> f DataSource)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DataSource
-> f DataSource
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 time that the @DataSource@ was created. The time is expressed in
-- epoch time.
dataSource_createdAt :: Lens.Lens' DataSource (Prelude.Maybe Prelude.UTCTime)
dataSource_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> DataSource -> f DataSource
dataSource_createdAt = (DataSource -> Maybe POSIX)
-> (DataSource -> Maybe POSIX -> DataSource)
-> Lens DataSource DataSource (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:DataSource' :: DataSource -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: DataSource
s@DataSource' {} Maybe POSIX
a -> DataSource
s {$sel:createdAt:DataSource' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: DataSource) ((Maybe POSIX -> f (Maybe POSIX)) -> DataSource -> f DataSource)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DataSource
-> f DataSource
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

-- | Undocumented member.
dataSource_computeTime :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Integer)
dataSource_computeTime :: (Maybe Integer -> f (Maybe Integer)) -> DataSource -> f DataSource
dataSource_computeTime = (DataSource -> Maybe Integer)
-> (DataSource -> Maybe Integer -> DataSource)
-> Lens DataSource DataSource (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Integer
computeTime :: Maybe Integer
$sel:computeTime:DataSource' :: DataSource -> Maybe Integer
computeTime} -> Maybe Integer
computeTime) (\s :: DataSource
s@DataSource' {} Maybe Integer
a -> DataSource
s {$sel:computeTime:DataSource' :: Maybe Integer
computeTime = Maybe Integer
a} :: DataSource)

-- | The ID that is assigned to the @DataSource@ during creation.
dataSource_dataSourceId :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Text)
dataSource_dataSourceId :: (Maybe Text -> f (Maybe Text)) -> DataSource -> f DataSource
dataSource_dataSourceId = (DataSource -> Maybe Text)
-> (DataSource -> Maybe Text -> DataSource)
-> Lens DataSource DataSource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Text
dataSourceId :: Maybe Text
$sel:dataSourceId:DataSource' :: DataSource -> Maybe Text
dataSourceId} -> Maybe Text
dataSourceId) (\s :: DataSource
s@DataSource' {} Maybe Text
a -> DataSource
s {$sel:dataSourceId:DataSource' :: Maybe Text
dataSourceId = Maybe Text
a} :: DataSource)

-- | Undocumented member.
dataSource_rDSMetadata :: Lens.Lens' DataSource (Prelude.Maybe RDSMetadata)
dataSource_rDSMetadata :: (Maybe RDSMetadata -> f (Maybe RDSMetadata))
-> DataSource -> f DataSource
dataSource_rDSMetadata = (DataSource -> Maybe RDSMetadata)
-> (DataSource -> Maybe RDSMetadata -> DataSource)
-> Lens
     DataSource DataSource (Maybe RDSMetadata) (Maybe RDSMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe RDSMetadata
rDSMetadata :: Maybe RDSMetadata
$sel:rDSMetadata:DataSource' :: DataSource -> Maybe RDSMetadata
rDSMetadata} -> Maybe RDSMetadata
rDSMetadata) (\s :: DataSource
s@DataSource' {} Maybe RDSMetadata
a -> DataSource
s {$sel:rDSMetadata:DataSource' :: Maybe RDSMetadata
rDSMetadata = Maybe RDSMetadata
a} :: DataSource)

-- | The total number of observations contained in the data files that the
-- @DataSource@ references.
dataSource_dataSizeInBytes :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Integer)
dataSource_dataSizeInBytes :: (Maybe Integer -> f (Maybe Integer)) -> DataSource -> f DataSource
dataSource_dataSizeInBytes = (DataSource -> Maybe Integer)
-> (DataSource -> Maybe Integer -> DataSource)
-> Lens DataSource DataSource (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Integer
dataSizeInBytes :: Maybe Integer
$sel:dataSizeInBytes:DataSource' :: DataSource -> Maybe Integer
dataSizeInBytes} -> Maybe Integer
dataSizeInBytes) (\s :: DataSource
s@DataSource' {} Maybe Integer
a -> DataSource
s {$sel:dataSizeInBytes:DataSource' :: Maybe Integer
dataSizeInBytes = Maybe Integer
a} :: DataSource)

-- | Undocumented member.
dataSource_startedAt :: Lens.Lens' DataSource (Prelude.Maybe Prelude.UTCTime)
dataSource_startedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> DataSource -> f DataSource
dataSource_startedAt = (DataSource -> Maybe POSIX)
-> (DataSource -> Maybe POSIX -> DataSource)
-> Lens DataSource DataSource (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe POSIX
startedAt :: Maybe POSIX
$sel:startedAt:DataSource' :: DataSource -> Maybe POSIX
startedAt} -> Maybe POSIX
startedAt) (\s :: DataSource
s@DataSource' {} Maybe POSIX
a -> DataSource
s {$sel:startedAt:DataSource' :: Maybe POSIX
startedAt = Maybe POSIX
a} :: DataSource) ((Maybe POSIX -> f (Maybe POSIX)) -> DataSource -> f DataSource)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DataSource
-> f DataSource
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

-- | Undocumented member.
dataSource_finishedAt :: Lens.Lens' DataSource (Prelude.Maybe Prelude.UTCTime)
dataSource_finishedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> DataSource -> f DataSource
dataSource_finishedAt = (DataSource -> Maybe POSIX)
-> (DataSource -> Maybe POSIX -> DataSource)
-> Lens DataSource DataSource (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe POSIX
finishedAt :: Maybe POSIX
$sel:finishedAt:DataSource' :: DataSource -> Maybe POSIX
finishedAt} -> Maybe POSIX
finishedAt) (\s :: DataSource
s@DataSource' {} Maybe POSIX
a -> DataSource
s {$sel:finishedAt:DataSource' :: Maybe POSIX
finishedAt = Maybe POSIX
a} :: DataSource) ((Maybe POSIX -> f (Maybe POSIX)) -> DataSource -> f DataSource)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DataSource
-> f DataSource
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 user account from which the @DataSource@ was created. The
-- account type can be either an AWS root account or an AWS Identity and
-- Access Management (IAM) user account.
dataSource_createdByIamUser :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Text)
dataSource_createdByIamUser :: (Maybe Text -> f (Maybe Text)) -> DataSource -> f DataSource
dataSource_createdByIamUser = (DataSource -> Maybe Text)
-> (DataSource -> Maybe Text -> DataSource)
-> Lens DataSource DataSource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Text
createdByIamUser :: Maybe Text
$sel:createdByIamUser:DataSource' :: DataSource -> Maybe Text
createdByIamUser} -> Maybe Text
createdByIamUser) (\s :: DataSource
s@DataSource' {} Maybe Text
a -> DataSource
s {$sel:createdByIamUser:DataSource' :: Maybe Text
createdByIamUser = Maybe Text
a} :: DataSource)

-- | A user-supplied name or description of the @DataSource@.
dataSource_name :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Text)
dataSource_name :: (Maybe Text -> f (Maybe Text)) -> DataSource -> f DataSource
dataSource_name = (DataSource -> Maybe Text)
-> (DataSource -> Maybe Text -> DataSource)
-> Lens DataSource DataSource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Text
name :: Maybe Text
$sel:name:DataSource' :: DataSource -> Maybe Text
name} -> Maybe Text
name) (\s :: DataSource
s@DataSource' {} Maybe Text
a -> DataSource
s {$sel:name:DataSource' :: Maybe Text
name = Maybe Text
a} :: DataSource)

-- | The location and name of the data in Amazon Simple Storage Service
-- (Amazon S3) that is used by a @DataSource@.
dataSource_dataLocationS3 :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Text)
dataSource_dataLocationS3 :: (Maybe Text -> f (Maybe Text)) -> DataSource -> f DataSource
dataSource_dataLocationS3 = (DataSource -> Maybe Text)
-> (DataSource -> Maybe Text -> DataSource)
-> Lens DataSource DataSource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Text
dataLocationS3 :: Maybe Text
$sel:dataLocationS3:DataSource' :: DataSource -> Maybe Text
dataLocationS3} -> Maybe Text
dataLocationS3) (\s :: DataSource
s@DataSource' {} Maybe Text
a -> DataSource
s {$sel:dataLocationS3:DataSource' :: Maybe Text
dataLocationS3 = Maybe Text
a} :: DataSource)

-- | The parameter is @true@ if statistics need to be generated from the
-- observation data.
dataSource_computeStatistics :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Bool)
dataSource_computeStatistics :: (Maybe Bool -> f (Maybe Bool)) -> DataSource -> f DataSource
dataSource_computeStatistics = (DataSource -> Maybe Bool)
-> (DataSource -> Maybe Bool -> DataSource)
-> Lens DataSource DataSource (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Bool
computeStatistics :: Maybe Bool
$sel:computeStatistics:DataSource' :: DataSource -> Maybe Bool
computeStatistics} -> Maybe Bool
computeStatistics) (\s :: DataSource
s@DataSource' {} Maybe Bool
a -> DataSource
s {$sel:computeStatistics:DataSource' :: Maybe Bool
computeStatistics = Maybe Bool
a} :: DataSource)

-- | A description of the most recent details about creating the
-- @DataSource@.
dataSource_message :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Text)
dataSource_message :: (Maybe Text -> f (Maybe Text)) -> DataSource -> f DataSource
dataSource_message = (DataSource -> Maybe Text)
-> (DataSource -> Maybe Text -> DataSource)
-> Lens DataSource DataSource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Text
message :: Maybe Text
$sel:message:DataSource' :: DataSource -> Maybe Text
message} -> Maybe Text
message) (\s :: DataSource
s@DataSource' {} Maybe Text
a -> DataSource
s {$sel:message:DataSource' :: Maybe Text
message = Maybe Text
a} :: DataSource)

-- | Undocumented member.
dataSource_redshiftMetadata :: Lens.Lens' DataSource (Prelude.Maybe RedshiftMetadata)
dataSource_redshiftMetadata :: (Maybe RedshiftMetadata -> f (Maybe RedshiftMetadata))
-> DataSource -> f DataSource
dataSource_redshiftMetadata = (DataSource -> Maybe RedshiftMetadata)
-> (DataSource -> Maybe RedshiftMetadata -> DataSource)
-> Lens
     DataSource
     DataSource
     (Maybe RedshiftMetadata)
     (Maybe RedshiftMetadata)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe RedshiftMetadata
redshiftMetadata :: Maybe RedshiftMetadata
$sel:redshiftMetadata:DataSource' :: DataSource -> Maybe RedshiftMetadata
redshiftMetadata} -> Maybe RedshiftMetadata
redshiftMetadata) (\s :: DataSource
s@DataSource' {} Maybe RedshiftMetadata
a -> DataSource
s {$sel:redshiftMetadata:DataSource' :: Maybe RedshiftMetadata
redshiftMetadata = Maybe RedshiftMetadata
a} :: DataSource)

-- | A JSON string that represents the splitting and rearrangement
-- requirement used when this @DataSource@ was created.
dataSource_dataRearrangement :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Text)
dataSource_dataRearrangement :: (Maybe Text -> f (Maybe Text)) -> DataSource -> f DataSource
dataSource_dataRearrangement = (DataSource -> Maybe Text)
-> (DataSource -> Maybe Text -> DataSource)
-> Lens DataSource DataSource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Text
dataRearrangement :: Maybe Text
$sel:dataRearrangement:DataSource' :: DataSource -> Maybe Text
dataRearrangement} -> Maybe Text
dataRearrangement) (\s :: DataSource
s@DataSource' {} Maybe Text
a -> DataSource
s {$sel:dataRearrangement:DataSource' :: Maybe Text
dataRearrangement = Maybe Text
a} :: DataSource)

-- | Undocumented member.
dataSource_roleARN :: Lens.Lens' DataSource (Prelude.Maybe Prelude.Text)
dataSource_roleARN :: (Maybe Text -> f (Maybe Text)) -> DataSource -> f DataSource
dataSource_roleARN = (DataSource -> Maybe Text)
-> (DataSource -> Maybe Text -> DataSource)
-> Lens DataSource DataSource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataSource' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:DataSource' :: DataSource -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: DataSource
s@DataSource' {} Maybe Text
a -> DataSource
s {$sel:roleARN:DataSource' :: Maybe Text
roleARN = Maybe Text
a} :: DataSource)

instance Core.FromJSON DataSource where
  parseJSON :: Value -> Parser DataSource
parseJSON =
    String
-> (Object -> Parser DataSource) -> Value -> Parser DataSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DataSource"
      ( \Object
x ->
          Maybe EntityStatus
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe RDSMetadata
-> Maybe Integer
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe RedshiftMetadata
-> Maybe Text
-> Maybe Text
-> DataSource
DataSource'
            (Maybe EntityStatus
 -> Maybe Integer
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Integer
 -> Maybe Text
 -> Maybe RDSMetadata
 -> Maybe Integer
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe RedshiftMetadata
 -> Maybe Text
 -> Maybe Text
 -> DataSource)
-> Parser (Maybe EntityStatus)
-> Parser
     (Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe RDSMetadata
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> DataSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe EntityStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe RDSMetadata
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> DataSource)
-> Parser (Maybe Integer)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe RDSMetadata
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> DataSource)
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
"NumberOfFiles")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe RDSMetadata
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> DataSource)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe Integer
      -> Maybe Text
      -> Maybe RDSMetadata
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> DataSource)
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
"LastUpdatedAt")
            Parser
  (Maybe POSIX
   -> Maybe Integer
   -> Maybe Text
   -> Maybe RDSMetadata
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> DataSource)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Integer
      -> Maybe Text
      -> Maybe RDSMetadata
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> DataSource)
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 Integer
   -> Maybe Text
   -> Maybe RDSMetadata
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> DataSource)
-> Parser (Maybe Integer)
-> Parser
     (Maybe Text
      -> Maybe RDSMetadata
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> DataSource)
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
"ComputeTime")
            Parser
  (Maybe Text
   -> Maybe RDSMetadata
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> DataSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe RDSMetadata
      -> Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> DataSource)
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
"DataSourceId")
            Parser
  (Maybe RDSMetadata
   -> Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> DataSource)
-> Parser (Maybe RDSMetadata)
-> Parser
     (Maybe Integer
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> DataSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RDSMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RDSMetadata")
            Parser
  (Maybe Integer
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> DataSource)
-> Parser (Maybe Integer)
-> Parser
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> DataSource)
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
"DataSizeInBytes")
            Parser
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> DataSource)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> DataSource)
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
"StartedAt")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> DataSource)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> DataSource)
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
"FinishedAt")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> DataSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> DataSource)
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
"CreatedByIamUser")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> DataSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> DataSource)
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 Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> DataSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> DataSource)
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
"DataLocationS3")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> DataSource)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe RedshiftMetadata
      -> Maybe Text
      -> Maybe Text
      -> DataSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ComputeStatistics")
            Parser
  (Maybe Text
   -> Maybe RedshiftMetadata
   -> Maybe Text
   -> Maybe Text
   -> DataSource)
-> Parser (Maybe Text)
-> Parser
     (Maybe RedshiftMetadata -> Maybe Text -> Maybe Text -> DataSource)
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
"Message")
            Parser
  (Maybe RedshiftMetadata -> Maybe Text -> Maybe Text -> DataSource)
-> Parser (Maybe RedshiftMetadata)
-> Parser (Maybe Text -> Maybe Text -> DataSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RedshiftMetadata)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RedshiftMetadata")
            Parser (Maybe Text -> Maybe Text -> DataSource)
-> Parser (Maybe Text) -> Parser (Maybe Text -> DataSource)
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
"DataRearrangement")
            Parser (Maybe Text -> DataSource)
-> Parser (Maybe Text) -> Parser DataSource
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
"RoleARN")
      )

instance Prelude.Hashable DataSource

instance Prelude.NFData DataSource