{-# 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.FinSpaceData.Types.ChangesetInfo
-- 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.FinSpaceData.Types.ChangesetInfo where

import qualified Amazonka.Core as Core
import Amazonka.FinSpaceData.Types.ChangeType
import Amazonka.FinSpaceData.Types.ChangesetStatus
import Amazonka.FinSpaceData.Types.ErrorInfo
import Amazonka.FinSpaceData.Types.FormatType
import Amazonka.FinSpaceData.Types.SourceType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A changeset is unit of data in a dataset.
--
-- /See:/ 'newChangesetInfo' smart constructor.
data ChangesetInfo = ChangesetInfo'
  { -- | The status of changeset creation operation.
    ChangesetInfo -> Maybe ChangesetStatus
status :: Prelude.Maybe ChangesetStatus,
    -- | Type of the data source from which the files to create the changeset are
    -- sourced.
    --
    -- -   @S3@ - Amazon S3.
    ChangesetInfo -> Maybe SourceType
sourceType :: Prelude.Maybe SourceType,
    -- | Source path from which the files to create the changeset are sourced.
    ChangesetInfo -> Maybe (HashMap Text Text)
sourceParams :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Tags associated with the changeset.
    ChangesetInfo -> Maybe (HashMap Text Text)
changesetLabels :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Unique identifier of the changeset that is updated a changeset.
    ChangesetInfo -> Maybe Text
updatedByChangesetId :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the FinSpace dataset in which the changeset is
    -- created.
    ChangesetInfo -> Maybe Text
datasetId :: Prelude.Maybe Prelude.Text,
    -- | Structure of the source file(s).
    ChangesetInfo -> Maybe (HashMap Text Text)
formatParams :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The timestamp at which the changeset was created in FinSpace.
    ChangesetInfo -> Maybe POSIX
createTimestamp :: Prelude.Maybe Core.POSIX,
    -- | Unique identifier for a changeset.
    ChangesetInfo -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | Format type of the input files loaded into the changeset.
    ChangesetInfo -> Maybe FormatType
formatType :: Prelude.Maybe FormatType,
    -- | Unique identifier of the changeset that is updated.
    ChangesetInfo -> Maybe Text
updatesChangesetId :: Prelude.Maybe Prelude.Text,
    -- | Change type indicates how a changeset is applied to a dataset.
    --
    -- -   @REPLACE@ - Changeset is considered as a replacement to all prior
    --     loaded changesets.
    --
    -- -   @APPEND@ - Changeset is considered as an addition to the end of all
    --     prior loaded changesets.
    --
    -- -   @MODIFY@ - Changeset is considered as a replacement to a specific
    --     prior ingested changeset.
    ChangesetInfo -> Maybe ChangeType
changeType :: Prelude.Maybe ChangeType,
    -- | The structure with error messages.
    ChangesetInfo -> Maybe ErrorInfo
errorInfo :: Prelude.Maybe ErrorInfo,
    -- | The ARN identifier of the changeset.
    ChangesetInfo -> Maybe Text
changesetArn :: Prelude.Maybe Prelude.Text
  }
  deriving (ChangesetInfo -> ChangesetInfo -> Bool
(ChangesetInfo -> ChangesetInfo -> Bool)
-> (ChangesetInfo -> ChangesetInfo -> Bool) -> Eq ChangesetInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChangesetInfo -> ChangesetInfo -> Bool
$c/= :: ChangesetInfo -> ChangesetInfo -> Bool
== :: ChangesetInfo -> ChangesetInfo -> Bool
$c== :: ChangesetInfo -> ChangesetInfo -> Bool
Prelude.Eq, ReadPrec [ChangesetInfo]
ReadPrec ChangesetInfo
Int -> ReadS ChangesetInfo
ReadS [ChangesetInfo]
(Int -> ReadS ChangesetInfo)
-> ReadS [ChangesetInfo]
-> ReadPrec ChangesetInfo
-> ReadPrec [ChangesetInfo]
-> Read ChangesetInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ChangesetInfo]
$creadListPrec :: ReadPrec [ChangesetInfo]
readPrec :: ReadPrec ChangesetInfo
$creadPrec :: ReadPrec ChangesetInfo
readList :: ReadS [ChangesetInfo]
$creadList :: ReadS [ChangesetInfo]
readsPrec :: Int -> ReadS ChangesetInfo
$creadsPrec :: Int -> ReadS ChangesetInfo
Prelude.Read, Int -> ChangesetInfo -> ShowS
[ChangesetInfo] -> ShowS
ChangesetInfo -> String
(Int -> ChangesetInfo -> ShowS)
-> (ChangesetInfo -> String)
-> ([ChangesetInfo] -> ShowS)
-> Show ChangesetInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChangesetInfo] -> ShowS
$cshowList :: [ChangesetInfo] -> ShowS
show :: ChangesetInfo -> String
$cshow :: ChangesetInfo -> String
showsPrec :: Int -> ChangesetInfo -> ShowS
$cshowsPrec :: Int -> ChangesetInfo -> ShowS
Prelude.Show, (forall x. ChangesetInfo -> Rep ChangesetInfo x)
-> (forall x. Rep ChangesetInfo x -> ChangesetInfo)
-> Generic ChangesetInfo
forall x. Rep ChangesetInfo x -> ChangesetInfo
forall x. ChangesetInfo -> Rep ChangesetInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChangesetInfo x -> ChangesetInfo
$cfrom :: forall x. ChangesetInfo -> Rep ChangesetInfo x
Prelude.Generic)

-- |
-- Create a value of 'ChangesetInfo' 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', 'changesetInfo_status' - The status of changeset creation operation.
--
-- 'sourceType', 'changesetInfo_sourceType' - Type of the data source from which the files to create the changeset are
-- sourced.
--
-- -   @S3@ - Amazon S3.
--
-- 'sourceParams', 'changesetInfo_sourceParams' - Source path from which the files to create the changeset are sourced.
--
-- 'changesetLabels', 'changesetInfo_changesetLabels' - Tags associated with the changeset.
--
-- 'updatedByChangesetId', 'changesetInfo_updatedByChangesetId' - Unique identifier of the changeset that is updated a changeset.
--
-- 'datasetId', 'changesetInfo_datasetId' - The unique identifier for the FinSpace dataset in which the changeset is
-- created.
--
-- 'formatParams', 'changesetInfo_formatParams' - Structure of the source file(s).
--
-- 'createTimestamp', 'changesetInfo_createTimestamp' - The timestamp at which the changeset was created in FinSpace.
--
-- 'id', 'changesetInfo_id' - Unique identifier for a changeset.
--
-- 'formatType', 'changesetInfo_formatType' - Format type of the input files loaded into the changeset.
--
-- 'updatesChangesetId', 'changesetInfo_updatesChangesetId' - Unique identifier of the changeset that is updated.
--
-- 'changeType', 'changesetInfo_changeType' - Change type indicates how a changeset is applied to a dataset.
--
-- -   @REPLACE@ - Changeset is considered as a replacement to all prior
--     loaded changesets.
--
-- -   @APPEND@ - Changeset is considered as an addition to the end of all
--     prior loaded changesets.
--
-- -   @MODIFY@ - Changeset is considered as a replacement to a specific
--     prior ingested changeset.
--
-- 'errorInfo', 'changesetInfo_errorInfo' - The structure with error messages.
--
-- 'changesetArn', 'changesetInfo_changesetArn' - The ARN identifier of the changeset.
newChangesetInfo ::
  ChangesetInfo
newChangesetInfo :: ChangesetInfo
newChangesetInfo =
  ChangesetInfo' :: Maybe ChangesetStatus
-> Maybe SourceType
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe FormatType
-> Maybe Text
-> Maybe ChangeType
-> Maybe ErrorInfo
-> Maybe Text
-> ChangesetInfo
ChangesetInfo'
    { $sel:status:ChangesetInfo' :: Maybe ChangesetStatus
status = Maybe ChangesetStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceType:ChangesetInfo' :: Maybe SourceType
sourceType = Maybe SourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceParams:ChangesetInfo' :: Maybe (HashMap Text Text)
sourceParams = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:changesetLabels:ChangesetInfo' :: Maybe (HashMap Text Text)
changesetLabels = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:updatedByChangesetId:ChangesetInfo' :: Maybe Text
updatedByChangesetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:datasetId:ChangesetInfo' :: Maybe Text
datasetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:formatParams:ChangesetInfo' :: Maybe (HashMap Text Text)
formatParams = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:createTimestamp:ChangesetInfo' :: Maybe POSIX
createTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:id:ChangesetInfo' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:formatType:ChangesetInfo' :: Maybe FormatType
formatType = Maybe FormatType
forall a. Maybe a
Prelude.Nothing,
      $sel:updatesChangesetId:ChangesetInfo' :: Maybe Text
updatesChangesetId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:changeType:ChangesetInfo' :: Maybe ChangeType
changeType = Maybe ChangeType
forall a. Maybe a
Prelude.Nothing,
      $sel:errorInfo:ChangesetInfo' :: Maybe ErrorInfo
errorInfo = Maybe ErrorInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:changesetArn:ChangesetInfo' :: Maybe Text
changesetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of changeset creation operation.
changesetInfo_status :: Lens.Lens' ChangesetInfo (Prelude.Maybe ChangesetStatus)
changesetInfo_status :: (Maybe ChangesetStatus -> f (Maybe ChangesetStatus))
-> ChangesetInfo -> f ChangesetInfo
changesetInfo_status = (ChangesetInfo -> Maybe ChangesetStatus)
-> (ChangesetInfo -> Maybe ChangesetStatus -> ChangesetInfo)
-> Lens
     ChangesetInfo
     ChangesetInfo
     (Maybe ChangesetStatus)
     (Maybe ChangesetStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangesetInfo' {Maybe ChangesetStatus
status :: Maybe ChangesetStatus
$sel:status:ChangesetInfo' :: ChangesetInfo -> Maybe ChangesetStatus
status} -> Maybe ChangesetStatus
status) (\s :: ChangesetInfo
s@ChangesetInfo' {} Maybe ChangesetStatus
a -> ChangesetInfo
s {$sel:status:ChangesetInfo' :: Maybe ChangesetStatus
status = Maybe ChangesetStatus
a} :: ChangesetInfo)

-- | Type of the data source from which the files to create the changeset are
-- sourced.
--
-- -   @S3@ - Amazon S3.
changesetInfo_sourceType :: Lens.Lens' ChangesetInfo (Prelude.Maybe SourceType)
changesetInfo_sourceType :: (Maybe SourceType -> f (Maybe SourceType))
-> ChangesetInfo -> f ChangesetInfo
changesetInfo_sourceType = (ChangesetInfo -> Maybe SourceType)
-> (ChangesetInfo -> Maybe SourceType -> ChangesetInfo)
-> Lens
     ChangesetInfo ChangesetInfo (Maybe SourceType) (Maybe SourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangesetInfo' {Maybe SourceType
sourceType :: Maybe SourceType
$sel:sourceType:ChangesetInfo' :: ChangesetInfo -> Maybe SourceType
sourceType} -> Maybe SourceType
sourceType) (\s :: ChangesetInfo
s@ChangesetInfo' {} Maybe SourceType
a -> ChangesetInfo
s {$sel:sourceType:ChangesetInfo' :: Maybe SourceType
sourceType = Maybe SourceType
a} :: ChangesetInfo)

-- | Source path from which the files to create the changeset are sourced.
changesetInfo_sourceParams :: Lens.Lens' ChangesetInfo (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
changesetInfo_sourceParams :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ChangesetInfo -> f ChangesetInfo
changesetInfo_sourceParams = (ChangesetInfo -> Maybe (HashMap Text Text))
-> (ChangesetInfo -> Maybe (HashMap Text Text) -> ChangesetInfo)
-> Lens
     ChangesetInfo
     ChangesetInfo
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangesetInfo' {Maybe (HashMap Text Text)
sourceParams :: Maybe (HashMap Text Text)
$sel:sourceParams:ChangesetInfo' :: ChangesetInfo -> Maybe (HashMap Text Text)
sourceParams} -> Maybe (HashMap Text Text)
sourceParams) (\s :: ChangesetInfo
s@ChangesetInfo' {} Maybe (HashMap Text Text)
a -> ChangesetInfo
s {$sel:sourceParams:ChangesetInfo' :: Maybe (HashMap Text Text)
sourceParams = Maybe (HashMap Text Text)
a} :: ChangesetInfo) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> ChangesetInfo -> f ChangesetInfo)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ChangesetInfo
-> f ChangesetInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Tags associated with the changeset.
changesetInfo_changesetLabels :: Lens.Lens' ChangesetInfo (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
changesetInfo_changesetLabels :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ChangesetInfo -> f ChangesetInfo
changesetInfo_changesetLabels = (ChangesetInfo -> Maybe (HashMap Text Text))
-> (ChangesetInfo -> Maybe (HashMap Text Text) -> ChangesetInfo)
-> Lens
     ChangesetInfo
     ChangesetInfo
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangesetInfo' {Maybe (HashMap Text Text)
changesetLabels :: Maybe (HashMap Text Text)
$sel:changesetLabels:ChangesetInfo' :: ChangesetInfo -> Maybe (HashMap Text Text)
changesetLabels} -> Maybe (HashMap Text Text)
changesetLabels) (\s :: ChangesetInfo
s@ChangesetInfo' {} Maybe (HashMap Text Text)
a -> ChangesetInfo
s {$sel:changesetLabels:ChangesetInfo' :: Maybe (HashMap Text Text)
changesetLabels = Maybe (HashMap Text Text)
a} :: ChangesetInfo) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> ChangesetInfo -> f ChangesetInfo)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ChangesetInfo
-> f ChangesetInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Unique identifier of the changeset that is updated a changeset.
changesetInfo_updatedByChangesetId :: Lens.Lens' ChangesetInfo (Prelude.Maybe Prelude.Text)
changesetInfo_updatedByChangesetId :: (Maybe Text -> f (Maybe Text)) -> ChangesetInfo -> f ChangesetInfo
changesetInfo_updatedByChangesetId = (ChangesetInfo -> Maybe Text)
-> (ChangesetInfo -> Maybe Text -> ChangesetInfo)
-> Lens ChangesetInfo ChangesetInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangesetInfo' {Maybe Text
updatedByChangesetId :: Maybe Text
$sel:updatedByChangesetId:ChangesetInfo' :: ChangesetInfo -> Maybe Text
updatedByChangesetId} -> Maybe Text
updatedByChangesetId) (\s :: ChangesetInfo
s@ChangesetInfo' {} Maybe Text
a -> ChangesetInfo
s {$sel:updatedByChangesetId:ChangesetInfo' :: Maybe Text
updatedByChangesetId = Maybe Text
a} :: ChangesetInfo)

-- | The unique identifier for the FinSpace dataset in which the changeset is
-- created.
changesetInfo_datasetId :: Lens.Lens' ChangesetInfo (Prelude.Maybe Prelude.Text)
changesetInfo_datasetId :: (Maybe Text -> f (Maybe Text)) -> ChangesetInfo -> f ChangesetInfo
changesetInfo_datasetId = (ChangesetInfo -> Maybe Text)
-> (ChangesetInfo -> Maybe Text -> ChangesetInfo)
-> Lens ChangesetInfo ChangesetInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangesetInfo' {Maybe Text
datasetId :: Maybe Text
$sel:datasetId:ChangesetInfo' :: ChangesetInfo -> Maybe Text
datasetId} -> Maybe Text
datasetId) (\s :: ChangesetInfo
s@ChangesetInfo' {} Maybe Text
a -> ChangesetInfo
s {$sel:datasetId:ChangesetInfo' :: Maybe Text
datasetId = Maybe Text
a} :: ChangesetInfo)

-- | Structure of the source file(s).
changesetInfo_formatParams :: Lens.Lens' ChangesetInfo (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
changesetInfo_formatParams :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ChangesetInfo -> f ChangesetInfo
changesetInfo_formatParams = (ChangesetInfo -> Maybe (HashMap Text Text))
-> (ChangesetInfo -> Maybe (HashMap Text Text) -> ChangesetInfo)
-> Lens
     ChangesetInfo
     ChangesetInfo
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangesetInfo' {Maybe (HashMap Text Text)
formatParams :: Maybe (HashMap Text Text)
$sel:formatParams:ChangesetInfo' :: ChangesetInfo -> Maybe (HashMap Text Text)
formatParams} -> Maybe (HashMap Text Text)
formatParams) (\s :: ChangesetInfo
s@ChangesetInfo' {} Maybe (HashMap Text Text)
a -> ChangesetInfo
s {$sel:formatParams:ChangesetInfo' :: Maybe (HashMap Text Text)
formatParams = Maybe (HashMap Text Text)
a} :: ChangesetInfo) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> ChangesetInfo -> f ChangesetInfo)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ChangesetInfo
-> f ChangesetInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The timestamp at which the changeset was created in FinSpace.
changesetInfo_createTimestamp :: Lens.Lens' ChangesetInfo (Prelude.Maybe Prelude.UTCTime)
changesetInfo_createTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ChangesetInfo -> f ChangesetInfo
changesetInfo_createTimestamp = (ChangesetInfo -> Maybe POSIX)
-> (ChangesetInfo -> Maybe POSIX -> ChangesetInfo)
-> Lens ChangesetInfo ChangesetInfo (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangesetInfo' {Maybe POSIX
createTimestamp :: Maybe POSIX
$sel:createTimestamp:ChangesetInfo' :: ChangesetInfo -> Maybe POSIX
createTimestamp} -> Maybe POSIX
createTimestamp) (\s :: ChangesetInfo
s@ChangesetInfo' {} Maybe POSIX
a -> ChangesetInfo
s {$sel:createTimestamp:ChangesetInfo' :: Maybe POSIX
createTimestamp = Maybe POSIX
a} :: ChangesetInfo) ((Maybe POSIX -> f (Maybe POSIX))
 -> ChangesetInfo -> f ChangesetInfo)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ChangesetInfo
-> f ChangesetInfo
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

-- | Unique identifier for a changeset.
changesetInfo_id :: Lens.Lens' ChangesetInfo (Prelude.Maybe Prelude.Text)
changesetInfo_id :: (Maybe Text -> f (Maybe Text)) -> ChangesetInfo -> f ChangesetInfo
changesetInfo_id = (ChangesetInfo -> Maybe Text)
-> (ChangesetInfo -> Maybe Text -> ChangesetInfo)
-> Lens ChangesetInfo ChangesetInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangesetInfo' {Maybe Text
id :: Maybe Text
$sel:id:ChangesetInfo' :: ChangesetInfo -> Maybe Text
id} -> Maybe Text
id) (\s :: ChangesetInfo
s@ChangesetInfo' {} Maybe Text
a -> ChangesetInfo
s {$sel:id:ChangesetInfo' :: Maybe Text
id = Maybe Text
a} :: ChangesetInfo)

-- | Format type of the input files loaded into the changeset.
changesetInfo_formatType :: Lens.Lens' ChangesetInfo (Prelude.Maybe FormatType)
changesetInfo_formatType :: (Maybe FormatType -> f (Maybe FormatType))
-> ChangesetInfo -> f ChangesetInfo
changesetInfo_formatType = (ChangesetInfo -> Maybe FormatType)
-> (ChangesetInfo -> Maybe FormatType -> ChangesetInfo)
-> Lens
     ChangesetInfo ChangesetInfo (Maybe FormatType) (Maybe FormatType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangesetInfo' {Maybe FormatType
formatType :: Maybe FormatType
$sel:formatType:ChangesetInfo' :: ChangesetInfo -> Maybe FormatType
formatType} -> Maybe FormatType
formatType) (\s :: ChangesetInfo
s@ChangesetInfo' {} Maybe FormatType
a -> ChangesetInfo
s {$sel:formatType:ChangesetInfo' :: Maybe FormatType
formatType = Maybe FormatType
a} :: ChangesetInfo)

-- | Unique identifier of the changeset that is updated.
changesetInfo_updatesChangesetId :: Lens.Lens' ChangesetInfo (Prelude.Maybe Prelude.Text)
changesetInfo_updatesChangesetId :: (Maybe Text -> f (Maybe Text)) -> ChangesetInfo -> f ChangesetInfo
changesetInfo_updatesChangesetId = (ChangesetInfo -> Maybe Text)
-> (ChangesetInfo -> Maybe Text -> ChangesetInfo)
-> Lens ChangesetInfo ChangesetInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangesetInfo' {Maybe Text
updatesChangesetId :: Maybe Text
$sel:updatesChangesetId:ChangesetInfo' :: ChangesetInfo -> Maybe Text
updatesChangesetId} -> Maybe Text
updatesChangesetId) (\s :: ChangesetInfo
s@ChangesetInfo' {} Maybe Text
a -> ChangesetInfo
s {$sel:updatesChangesetId:ChangesetInfo' :: Maybe Text
updatesChangesetId = Maybe Text
a} :: ChangesetInfo)

-- | Change type indicates how a changeset is applied to a dataset.
--
-- -   @REPLACE@ - Changeset is considered as a replacement to all prior
--     loaded changesets.
--
-- -   @APPEND@ - Changeset is considered as an addition to the end of all
--     prior loaded changesets.
--
-- -   @MODIFY@ - Changeset is considered as a replacement to a specific
--     prior ingested changeset.
changesetInfo_changeType :: Lens.Lens' ChangesetInfo (Prelude.Maybe ChangeType)
changesetInfo_changeType :: (Maybe ChangeType -> f (Maybe ChangeType))
-> ChangesetInfo -> f ChangesetInfo
changesetInfo_changeType = (ChangesetInfo -> Maybe ChangeType)
-> (ChangesetInfo -> Maybe ChangeType -> ChangesetInfo)
-> Lens
     ChangesetInfo ChangesetInfo (Maybe ChangeType) (Maybe ChangeType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangesetInfo' {Maybe ChangeType
changeType :: Maybe ChangeType
$sel:changeType:ChangesetInfo' :: ChangesetInfo -> Maybe ChangeType
changeType} -> Maybe ChangeType
changeType) (\s :: ChangesetInfo
s@ChangesetInfo' {} Maybe ChangeType
a -> ChangesetInfo
s {$sel:changeType:ChangesetInfo' :: Maybe ChangeType
changeType = Maybe ChangeType
a} :: ChangesetInfo)

-- | The structure with error messages.
changesetInfo_errorInfo :: Lens.Lens' ChangesetInfo (Prelude.Maybe ErrorInfo)
changesetInfo_errorInfo :: (Maybe ErrorInfo -> f (Maybe ErrorInfo))
-> ChangesetInfo -> f ChangesetInfo
changesetInfo_errorInfo = (ChangesetInfo -> Maybe ErrorInfo)
-> (ChangesetInfo -> Maybe ErrorInfo -> ChangesetInfo)
-> Lens
     ChangesetInfo ChangesetInfo (Maybe ErrorInfo) (Maybe ErrorInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangesetInfo' {Maybe ErrorInfo
errorInfo :: Maybe ErrorInfo
$sel:errorInfo:ChangesetInfo' :: ChangesetInfo -> Maybe ErrorInfo
errorInfo} -> Maybe ErrorInfo
errorInfo) (\s :: ChangesetInfo
s@ChangesetInfo' {} Maybe ErrorInfo
a -> ChangesetInfo
s {$sel:errorInfo:ChangesetInfo' :: Maybe ErrorInfo
errorInfo = Maybe ErrorInfo
a} :: ChangesetInfo)

-- | The ARN identifier of the changeset.
changesetInfo_changesetArn :: Lens.Lens' ChangesetInfo (Prelude.Maybe Prelude.Text)
changesetInfo_changesetArn :: (Maybe Text -> f (Maybe Text)) -> ChangesetInfo -> f ChangesetInfo
changesetInfo_changesetArn = (ChangesetInfo -> Maybe Text)
-> (ChangesetInfo -> Maybe Text -> ChangesetInfo)
-> Lens ChangesetInfo ChangesetInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChangesetInfo' {Maybe Text
changesetArn :: Maybe Text
$sel:changesetArn:ChangesetInfo' :: ChangesetInfo -> Maybe Text
changesetArn} -> Maybe Text
changesetArn) (\s :: ChangesetInfo
s@ChangesetInfo' {} Maybe Text
a -> ChangesetInfo
s {$sel:changesetArn:ChangesetInfo' :: Maybe Text
changesetArn = Maybe Text
a} :: ChangesetInfo)

instance Core.FromJSON ChangesetInfo where
  parseJSON :: Value -> Parser ChangesetInfo
parseJSON =
    String
-> (Object -> Parser ChangesetInfo)
-> Value
-> Parser ChangesetInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ChangesetInfo"
      ( \Object
x ->
          Maybe ChangesetStatus
-> Maybe SourceType
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe FormatType
-> Maybe Text
-> Maybe ChangeType
-> Maybe ErrorInfo
-> Maybe Text
-> ChangesetInfo
ChangesetInfo'
            (Maybe ChangesetStatus
 -> Maybe SourceType
 -> Maybe (HashMap Text Text)
 -> Maybe (HashMap Text Text)
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe FormatType
 -> Maybe Text
 -> Maybe ChangeType
 -> Maybe ErrorInfo
 -> Maybe Text
 -> ChangesetInfo)
-> Parser (Maybe ChangesetStatus)
-> Parser
     (Maybe SourceType
      -> Maybe (HashMap Text Text)
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe FormatType
      -> Maybe Text
      -> Maybe ChangeType
      -> Maybe ErrorInfo
      -> Maybe Text
      -> ChangesetInfo)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ChangesetStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe SourceType
   -> Maybe (HashMap Text Text)
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe FormatType
   -> Maybe Text
   -> Maybe ChangeType
   -> Maybe ErrorInfo
   -> Maybe Text
   -> ChangesetInfo)
-> Parser (Maybe SourceType)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe FormatType
      -> Maybe Text
      -> Maybe ChangeType
      -> Maybe ErrorInfo
      -> Maybe Text
      -> ChangesetInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SourceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sourceType")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe FormatType
   -> Maybe Text
   -> Maybe ChangeType
   -> Maybe ErrorInfo
   -> Maybe Text
   -> ChangesetInfo)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe FormatType
      -> Maybe Text
      -> Maybe ChangeType
      -> Maybe ErrorInfo
      -> Maybe Text
      -> ChangesetInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sourceParams" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe FormatType
   -> Maybe Text
   -> Maybe ChangeType
   -> Maybe ErrorInfo
   -> Maybe Text
   -> ChangesetInfo)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe FormatType
      -> Maybe Text
      -> Maybe ChangeType
      -> Maybe ErrorInfo
      -> Maybe Text
      -> ChangesetInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"changesetLabels"
                            Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe FormatType
   -> Maybe Text
   -> Maybe ChangeType
   -> Maybe ErrorInfo
   -> Maybe Text
   -> ChangesetInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe FormatType
      -> Maybe Text
      -> Maybe ChangeType
      -> Maybe ErrorInfo
      -> Maybe Text
      -> ChangesetInfo)
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
"updatedByChangesetId")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe FormatType
   -> Maybe Text
   -> Maybe ChangeType
   -> Maybe ErrorInfo
   -> Maybe Text
   -> ChangesetInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe FormatType
      -> Maybe Text
      -> Maybe ChangeType
      -> Maybe ErrorInfo
      -> Maybe Text
      -> ChangesetInfo)
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
"datasetId")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe FormatType
   -> Maybe Text
   -> Maybe ChangeType
   -> Maybe ErrorInfo
   -> Maybe Text
   -> ChangesetInfo)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe FormatType
      -> Maybe Text
      -> Maybe ChangeType
      -> Maybe ErrorInfo
      -> Maybe Text
      -> ChangesetInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"formatParams" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe FormatType
   -> Maybe Text
   -> Maybe ChangeType
   -> Maybe ErrorInfo
   -> Maybe Text
   -> ChangesetInfo)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe FormatType
      -> Maybe Text
      -> Maybe ChangeType
      -> Maybe ErrorInfo
      -> Maybe Text
      -> ChangesetInfo)
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
"createTimestamp")
            Parser
  (Maybe Text
   -> Maybe FormatType
   -> Maybe Text
   -> Maybe ChangeType
   -> Maybe ErrorInfo
   -> Maybe Text
   -> ChangesetInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe FormatType
      -> Maybe Text
      -> Maybe ChangeType
      -> Maybe ErrorInfo
      -> Maybe Text
      -> ChangesetInfo)
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
"id")
            Parser
  (Maybe FormatType
   -> Maybe Text
   -> Maybe ChangeType
   -> Maybe ErrorInfo
   -> Maybe Text
   -> ChangesetInfo)
-> Parser (Maybe FormatType)
-> Parser
     (Maybe Text
      -> Maybe ChangeType
      -> Maybe ErrorInfo
      -> Maybe Text
      -> ChangesetInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FormatType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"formatType")
            Parser
  (Maybe Text
   -> Maybe ChangeType
   -> Maybe ErrorInfo
   -> Maybe Text
   -> ChangesetInfo)
-> Parser (Maybe Text)
-> Parser
     (Maybe ChangeType
      -> Maybe ErrorInfo -> Maybe Text -> ChangesetInfo)
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
"updatesChangesetId")
            Parser
  (Maybe ChangeType
   -> Maybe ErrorInfo -> Maybe Text -> ChangesetInfo)
-> Parser (Maybe ChangeType)
-> Parser (Maybe ErrorInfo -> Maybe Text -> ChangesetInfo)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ChangeType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"changeType")
            Parser (Maybe ErrorInfo -> Maybe Text -> ChangesetInfo)
-> Parser (Maybe ErrorInfo) -> Parser (Maybe Text -> ChangesetInfo)
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 (Maybe Text -> ChangesetInfo)
-> Parser (Maybe Text) -> Parser ChangesetInfo
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
"changesetArn")
      )

instance Prelude.Hashable ChangesetInfo

instance Prelude.NFData ChangesetInfo