{-# 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.DataBrew.Types.Dataset
-- 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.DataBrew.Types.Dataset where

import qualified Amazonka.Core as Core
import Amazonka.DataBrew.Types.FormatOptions
import Amazonka.DataBrew.Types.Input
import Amazonka.DataBrew.Types.InputFormat
import Amazonka.DataBrew.Types.PathOptions
import Amazonka.DataBrew.Types.Source
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents a dataset that can be processed by DataBrew.
--
-- /See:/ 'newDataset' smart constructor.
data Dataset = Dataset'
  { -- | The last modification date and time of the dataset.
    Dataset -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
    -- | A set of options that defines how DataBrew interprets an Amazon S3 path
    -- of the dataset.
    Dataset -> Maybe PathOptions
pathOptions :: Prelude.Maybe PathOptions,
    -- | The date and time that the dataset was created.
    Dataset -> Maybe POSIX
createDate :: Prelude.Maybe Core.POSIX,
    -- | A set of options that define how DataBrew interprets the data in the
    -- dataset.
    Dataset -> Maybe FormatOptions
formatOptions :: Prelude.Maybe FormatOptions,
    -- | The file format of a dataset that is created from an Amazon S3 file or
    -- folder.
    Dataset -> Maybe InputFormat
format :: Prelude.Maybe InputFormat,
    -- | The Amazon Resource Name (ARN) of the user who created the dataset.
    Dataset -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Amazon Web Services account that owns the dataset.
    Dataset -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
    -- | The unique Amazon Resource Name (ARN) for the dataset.
    Dataset -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
    -- | The location of the data for the dataset, either Amazon S3 or the Glue
    -- Data Catalog.
    Dataset -> Maybe Source
source :: Prelude.Maybe Source,
    -- | The Amazon Resource Name (ARN) of the user who last modified the
    -- dataset.
    Dataset -> Maybe Text
lastModifiedBy :: Prelude.Maybe Prelude.Text,
    -- | Metadata tags that have been applied to the dataset.
    Dataset -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The unique name of the dataset.
    Dataset -> Text
name :: Prelude.Text,
    -- | Information on how DataBrew can find the dataset, in either the Glue
    -- Data Catalog or Amazon S3.
    Dataset -> Input
input :: Input
  }
  deriving (Dataset -> Dataset -> Bool
(Dataset -> Dataset -> Bool)
-> (Dataset -> Dataset -> Bool) -> Eq Dataset
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Dataset -> Dataset -> Bool
$c/= :: Dataset -> Dataset -> Bool
== :: Dataset -> Dataset -> Bool
$c== :: Dataset -> Dataset -> Bool
Prelude.Eq, ReadPrec [Dataset]
ReadPrec Dataset
Int -> ReadS Dataset
ReadS [Dataset]
(Int -> ReadS Dataset)
-> ReadS [Dataset]
-> ReadPrec Dataset
-> ReadPrec [Dataset]
-> Read Dataset
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Dataset]
$creadListPrec :: ReadPrec [Dataset]
readPrec :: ReadPrec Dataset
$creadPrec :: ReadPrec Dataset
readList :: ReadS [Dataset]
$creadList :: ReadS [Dataset]
readsPrec :: Int -> ReadS Dataset
$creadsPrec :: Int -> ReadS Dataset
Prelude.Read, Int -> Dataset -> ShowS
[Dataset] -> ShowS
Dataset -> String
(Int -> Dataset -> ShowS)
-> (Dataset -> String) -> ([Dataset] -> ShowS) -> Show Dataset
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Dataset] -> ShowS
$cshowList :: [Dataset] -> ShowS
show :: Dataset -> String
$cshow :: Dataset -> String
showsPrec :: Int -> Dataset -> ShowS
$cshowsPrec :: Int -> Dataset -> ShowS
Prelude.Show, (forall x. Dataset -> Rep Dataset x)
-> (forall x. Rep Dataset x -> Dataset) -> Generic Dataset
forall x. Rep Dataset x -> Dataset
forall x. Dataset -> Rep Dataset x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Dataset x -> Dataset
$cfrom :: forall x. Dataset -> Rep Dataset x
Prelude.Generic)

-- |
-- Create a value of 'Dataset' 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:
--
-- 'lastModifiedDate', 'dataset_lastModifiedDate' - The last modification date and time of the dataset.
--
-- 'pathOptions', 'dataset_pathOptions' - A set of options that defines how DataBrew interprets an Amazon S3 path
-- of the dataset.
--
-- 'createDate', 'dataset_createDate' - The date and time that the dataset was created.
--
-- 'formatOptions', 'dataset_formatOptions' - A set of options that define how DataBrew interprets the data in the
-- dataset.
--
-- 'format', 'dataset_format' - The file format of a dataset that is created from an Amazon S3 file or
-- folder.
--
-- 'createdBy', 'dataset_createdBy' - The Amazon Resource Name (ARN) of the user who created the dataset.
--
-- 'accountId', 'dataset_accountId' - The ID of the Amazon Web Services account that owns the dataset.
--
-- 'resourceArn', 'dataset_resourceArn' - The unique Amazon Resource Name (ARN) for the dataset.
--
-- 'source', 'dataset_source' - The location of the data for the dataset, either Amazon S3 or the Glue
-- Data Catalog.
--
-- 'lastModifiedBy', 'dataset_lastModifiedBy' - The Amazon Resource Name (ARN) of the user who last modified the
-- dataset.
--
-- 'tags', 'dataset_tags' - Metadata tags that have been applied to the dataset.
--
-- 'name', 'dataset_name' - The unique name of the dataset.
--
-- 'input', 'dataset_input' - Information on how DataBrew can find the dataset, in either the Glue
-- Data Catalog or Amazon S3.
newDataset ::
  -- | 'name'
  Prelude.Text ->
  -- | 'input'
  Input ->
  Dataset
newDataset :: Text -> Input -> Dataset
newDataset Text
pName_ Input
pInput_ =
  Dataset' :: Maybe POSIX
-> Maybe PathOptions
-> Maybe POSIX
-> Maybe FormatOptions
-> Maybe InputFormat
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Source
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Input
-> Dataset
Dataset'
    { $sel:lastModifiedDate:Dataset' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:pathOptions:Dataset' :: Maybe PathOptions
pathOptions = Maybe PathOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:createDate:Dataset' :: Maybe POSIX
createDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:formatOptions:Dataset' :: Maybe FormatOptions
formatOptions = Maybe FormatOptions
forall a. Maybe a
Prelude.Nothing,
      $sel:format:Dataset' :: Maybe InputFormat
format = Maybe InputFormat
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:Dataset' :: Maybe Text
createdBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:accountId:Dataset' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceArn:Dataset' :: Maybe Text
resourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:source:Dataset' :: Maybe Source
source = Maybe Source
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:Dataset' :: Maybe Text
lastModifiedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Dataset' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Dataset' :: Text
name = Text
pName_,
      $sel:input:Dataset' :: Input
input = Input
pInput_
    }

-- | The last modification date and time of the dataset.
dataset_lastModifiedDate :: Lens.Lens' Dataset (Prelude.Maybe Prelude.UTCTime)
dataset_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Dataset -> f Dataset
dataset_lastModifiedDate = (Dataset -> Maybe POSIX)
-> (Dataset -> Maybe POSIX -> Dataset)
-> Lens Dataset Dataset (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Dataset' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:Dataset' :: Dataset -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: Dataset
s@Dataset' {} Maybe POSIX
a -> Dataset
s {$sel:lastModifiedDate:Dataset' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: Dataset) ((Maybe POSIX -> f (Maybe POSIX)) -> Dataset -> f Dataset)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Dataset
-> f Dataset
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

-- | A set of options that defines how DataBrew interprets an Amazon S3 path
-- of the dataset.
dataset_pathOptions :: Lens.Lens' Dataset (Prelude.Maybe PathOptions)
dataset_pathOptions :: (Maybe PathOptions -> f (Maybe PathOptions))
-> Dataset -> f Dataset
dataset_pathOptions = (Dataset -> Maybe PathOptions)
-> (Dataset -> Maybe PathOptions -> Dataset)
-> Lens Dataset Dataset (Maybe PathOptions) (Maybe PathOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Dataset' {Maybe PathOptions
pathOptions :: Maybe PathOptions
$sel:pathOptions:Dataset' :: Dataset -> Maybe PathOptions
pathOptions} -> Maybe PathOptions
pathOptions) (\s :: Dataset
s@Dataset' {} Maybe PathOptions
a -> Dataset
s {$sel:pathOptions:Dataset' :: Maybe PathOptions
pathOptions = Maybe PathOptions
a} :: Dataset)

-- | The date and time that the dataset was created.
dataset_createDate :: Lens.Lens' Dataset (Prelude.Maybe Prelude.UTCTime)
dataset_createDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Dataset -> f Dataset
dataset_createDate = (Dataset -> Maybe POSIX)
-> (Dataset -> Maybe POSIX -> Dataset)
-> Lens Dataset Dataset (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Dataset' {Maybe POSIX
createDate :: Maybe POSIX
$sel:createDate:Dataset' :: Dataset -> Maybe POSIX
createDate} -> Maybe POSIX
createDate) (\s :: Dataset
s@Dataset' {} Maybe POSIX
a -> Dataset
s {$sel:createDate:Dataset' :: Maybe POSIX
createDate = Maybe POSIX
a} :: Dataset) ((Maybe POSIX -> f (Maybe POSIX)) -> Dataset -> f Dataset)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Dataset
-> f Dataset
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

-- | A set of options that define how DataBrew interprets the data in the
-- dataset.
dataset_formatOptions :: Lens.Lens' Dataset (Prelude.Maybe FormatOptions)
dataset_formatOptions :: (Maybe FormatOptions -> f (Maybe FormatOptions))
-> Dataset -> f Dataset
dataset_formatOptions = (Dataset -> Maybe FormatOptions)
-> (Dataset -> Maybe FormatOptions -> Dataset)
-> Lens Dataset Dataset (Maybe FormatOptions) (Maybe FormatOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Dataset' {Maybe FormatOptions
formatOptions :: Maybe FormatOptions
$sel:formatOptions:Dataset' :: Dataset -> Maybe FormatOptions
formatOptions} -> Maybe FormatOptions
formatOptions) (\s :: Dataset
s@Dataset' {} Maybe FormatOptions
a -> Dataset
s {$sel:formatOptions:Dataset' :: Maybe FormatOptions
formatOptions = Maybe FormatOptions
a} :: Dataset)

-- | The file format of a dataset that is created from an Amazon S3 file or
-- folder.
dataset_format :: Lens.Lens' Dataset (Prelude.Maybe InputFormat)
dataset_format :: (Maybe InputFormat -> f (Maybe InputFormat))
-> Dataset -> f Dataset
dataset_format = (Dataset -> Maybe InputFormat)
-> (Dataset -> Maybe InputFormat -> Dataset)
-> Lens Dataset Dataset (Maybe InputFormat) (Maybe InputFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Dataset' {Maybe InputFormat
format :: Maybe InputFormat
$sel:format:Dataset' :: Dataset -> Maybe InputFormat
format} -> Maybe InputFormat
format) (\s :: Dataset
s@Dataset' {} Maybe InputFormat
a -> Dataset
s {$sel:format:Dataset' :: Maybe InputFormat
format = Maybe InputFormat
a} :: Dataset)

-- | The Amazon Resource Name (ARN) of the user who created the dataset.
dataset_createdBy :: Lens.Lens' Dataset (Prelude.Maybe Prelude.Text)
dataset_createdBy :: (Maybe Text -> f (Maybe Text)) -> Dataset -> f Dataset
dataset_createdBy = (Dataset -> Maybe Text)
-> (Dataset -> Maybe Text -> Dataset)
-> Lens Dataset Dataset (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Dataset' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:Dataset' :: Dataset -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: Dataset
s@Dataset' {} Maybe Text
a -> Dataset
s {$sel:createdBy:Dataset' :: Maybe Text
createdBy = Maybe Text
a} :: Dataset)

-- | The ID of the Amazon Web Services account that owns the dataset.
dataset_accountId :: Lens.Lens' Dataset (Prelude.Maybe Prelude.Text)
dataset_accountId :: (Maybe Text -> f (Maybe Text)) -> Dataset -> f Dataset
dataset_accountId = (Dataset -> Maybe Text)
-> (Dataset -> Maybe Text -> Dataset)
-> Lens Dataset Dataset (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Dataset' {Maybe Text
accountId :: Maybe Text
$sel:accountId:Dataset' :: Dataset -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: Dataset
s@Dataset' {} Maybe Text
a -> Dataset
s {$sel:accountId:Dataset' :: Maybe Text
accountId = Maybe Text
a} :: Dataset)

-- | The unique Amazon Resource Name (ARN) for the dataset.
dataset_resourceArn :: Lens.Lens' Dataset (Prelude.Maybe Prelude.Text)
dataset_resourceArn :: (Maybe Text -> f (Maybe Text)) -> Dataset -> f Dataset
dataset_resourceArn = (Dataset -> Maybe Text)
-> (Dataset -> Maybe Text -> Dataset)
-> Lens Dataset Dataset (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Dataset' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:Dataset' :: Dataset -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: Dataset
s@Dataset' {} Maybe Text
a -> Dataset
s {$sel:resourceArn:Dataset' :: Maybe Text
resourceArn = Maybe Text
a} :: Dataset)

-- | The location of the data for the dataset, either Amazon S3 or the Glue
-- Data Catalog.
dataset_source :: Lens.Lens' Dataset (Prelude.Maybe Source)
dataset_source :: (Maybe Source -> f (Maybe Source)) -> Dataset -> f Dataset
dataset_source = (Dataset -> Maybe Source)
-> (Dataset -> Maybe Source -> Dataset)
-> Lens Dataset Dataset (Maybe Source) (Maybe Source)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Dataset' {Maybe Source
source :: Maybe Source
$sel:source:Dataset' :: Dataset -> Maybe Source
source} -> Maybe Source
source) (\s :: Dataset
s@Dataset' {} Maybe Source
a -> Dataset
s {$sel:source:Dataset' :: Maybe Source
source = Maybe Source
a} :: Dataset)

-- | The Amazon Resource Name (ARN) of the user who last modified the
-- dataset.
dataset_lastModifiedBy :: Lens.Lens' Dataset (Prelude.Maybe Prelude.Text)
dataset_lastModifiedBy :: (Maybe Text -> f (Maybe Text)) -> Dataset -> f Dataset
dataset_lastModifiedBy = (Dataset -> Maybe Text)
-> (Dataset -> Maybe Text -> Dataset)
-> Lens Dataset Dataset (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Dataset' {Maybe Text
lastModifiedBy :: Maybe Text
$sel:lastModifiedBy:Dataset' :: Dataset -> Maybe Text
lastModifiedBy} -> Maybe Text
lastModifiedBy) (\s :: Dataset
s@Dataset' {} Maybe Text
a -> Dataset
s {$sel:lastModifiedBy:Dataset' :: Maybe Text
lastModifiedBy = Maybe Text
a} :: Dataset)

-- | Metadata tags that have been applied to the dataset.
dataset_tags :: Lens.Lens' Dataset (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
dataset_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Dataset -> f Dataset
dataset_tags = (Dataset -> Maybe (HashMap Text Text))
-> (Dataset -> Maybe (HashMap Text Text) -> Dataset)
-> Lens
     Dataset
     Dataset
     (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 (\Dataset' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Dataset' :: Dataset -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Dataset
s@Dataset' {} Maybe (HashMap Text Text)
a -> Dataset
s {$sel:tags:Dataset' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Dataset) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Dataset -> f Dataset)
-> ((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)))
-> Dataset
-> f Dataset
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 unique name of the dataset.
dataset_name :: Lens.Lens' Dataset Prelude.Text
dataset_name :: (Text -> f Text) -> Dataset -> f Dataset
dataset_name = (Dataset -> Text)
-> (Dataset -> Text -> Dataset) -> Lens Dataset Dataset Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Dataset' {Text
name :: Text
$sel:name:Dataset' :: Dataset -> Text
name} -> Text
name) (\s :: Dataset
s@Dataset' {} Text
a -> Dataset
s {$sel:name:Dataset' :: Text
name = Text
a} :: Dataset)

-- | Information on how DataBrew can find the dataset, in either the Glue
-- Data Catalog or Amazon S3.
dataset_input :: Lens.Lens' Dataset Input
dataset_input :: (Input -> f Input) -> Dataset -> f Dataset
dataset_input = (Dataset -> Input)
-> (Dataset -> Input -> Dataset)
-> Lens Dataset Dataset Input Input
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Dataset' {Input
input :: Input
$sel:input:Dataset' :: Dataset -> Input
input} -> Input
input) (\s :: Dataset
s@Dataset' {} Input
a -> Dataset
s {$sel:input:Dataset' :: Input
input = Input
a} :: Dataset)

instance Core.FromJSON Dataset where
  parseJSON :: Value -> Parser Dataset
parseJSON =
    String -> (Object -> Parser Dataset) -> Value -> Parser Dataset
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Dataset"
      ( \Object
x ->
          Maybe POSIX
-> Maybe PathOptions
-> Maybe POSIX
-> Maybe FormatOptions
-> Maybe InputFormat
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Source
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Input
-> Dataset
Dataset'
            (Maybe POSIX
 -> Maybe PathOptions
 -> Maybe POSIX
 -> Maybe FormatOptions
 -> Maybe InputFormat
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Source
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Text
 -> Input
 -> Dataset)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe PathOptions
      -> Maybe POSIX
      -> Maybe FormatOptions
      -> Maybe InputFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Input
      -> Dataset)
forall (f :: * -> *) a b. Functor 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
"LastModifiedDate")
            Parser
  (Maybe PathOptions
   -> Maybe POSIX
   -> Maybe FormatOptions
   -> Maybe InputFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Input
   -> Dataset)
-> Parser (Maybe PathOptions)
-> Parser
     (Maybe POSIX
      -> Maybe FormatOptions
      -> Maybe InputFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Input
      -> Dataset)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PathOptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PathOptions")
            Parser
  (Maybe POSIX
   -> Maybe FormatOptions
   -> Maybe InputFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Input
   -> Dataset)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe FormatOptions
      -> Maybe InputFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Input
      -> Dataset)
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
"CreateDate")
            Parser
  (Maybe FormatOptions
   -> Maybe InputFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Input
   -> Dataset)
-> Parser (Maybe FormatOptions)
-> Parser
     (Maybe InputFormat
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Input
      -> Dataset)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FormatOptions)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FormatOptions")
            Parser
  (Maybe InputFormat
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Input
   -> Dataset)
-> Parser (Maybe InputFormat)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Input
      -> Dataset)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InputFormat)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Format")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Input
   -> Dataset)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Input
      -> Dataset)
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
"CreatedBy")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Input
   -> Dataset)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Source
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Input
      -> Dataset)
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
"AccountId")
            Parser
  (Maybe Text
   -> Maybe Source
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Input
   -> Dataset)
-> Parser (Maybe Text)
-> Parser
     (Maybe Source
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Text
      -> Input
      -> Dataset)
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
"ResourceArn")
            Parser
  (Maybe Source
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Text
   -> Input
   -> Dataset)
-> Parser (Maybe Source)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Text -> Input -> Dataset)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Source)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Source")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Text -> Input -> Dataset)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> Text -> Input -> Dataset)
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
"LastModifiedBy")
            Parser (Maybe (HashMap Text Text) -> Text -> Input -> Dataset)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Text -> Input -> Dataset)
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
"Tags" 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 (Text -> Input -> Dataset)
-> Parser Text -> Parser (Input -> Dataset)
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
"Name")
            Parser (Input -> Dataset) -> Parser Input -> Parser Dataset
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Input
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Input")
      )

instance Prelude.Hashable Dataset

instance Prelude.NFData Dataset