{-# 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.Glue.Types.S3CsvSource
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Glue.Types.S3CsvSource where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Glue.Types.CompressionType
import Amazonka.Glue.Types.GlueSchema
import Amazonka.Glue.Types.QuoteChar
import Amazonka.Glue.Types.S3DirectSourceAdditionalOptions
import Amazonka.Glue.Types.Separator
import qualified Amazonka.Prelude as Prelude

-- | Specifies a command-separated value (CSV) data store stored in Amazon
-- S3.
--
-- /See:/ 'newS3CsvSource' smart constructor.
data S3CsvSource = S3CsvSource'
  { -- | Specifies additional connection options.
    S3CsvSource -> Maybe S3DirectSourceAdditionalOptions
additionalOptions :: Prelude.Maybe S3DirectSourceAdditionalOptions,
    -- | Specifies how the data is compressed. This is generally not necessary if
    -- the data has a standard file extension. Possible values are @\"gzip\"@
    -- and @\"bzip\"@).
    S3CsvSource -> Maybe CompressionType
compressionType :: Prelude.Maybe CompressionType,
    -- | Specifies a character to use for escaping. This option is used only when
    -- reading CSV files. The default value is @none@. If enabled, the
    -- character which immediately follows is used as-is, except for a small
    -- set of well-known escapes (@\\n@, @\\r@, @\\t@, and @\\0@).
    S3CsvSource -> Maybe Text
escaper :: Prelude.Maybe Prelude.Text,
    -- | A string containing a JSON list of Unix-style glob patterns to exclude.
    -- For example, \"[\\\"**.pdf\\\"]\" excludes all PDF files.
    S3CsvSource -> Maybe [Text]
exclusions :: Prelude.Maybe [Prelude.Text],
    -- | Grouping files is turned on by default when the input contains more than
    -- 50,000 files. To turn on grouping with fewer than 50,000 files, set this
    -- parameter to \"inPartition\". To disable grouping when there are more
    -- than 50,000 files, set this parameter to @\"none\"@.
    S3CsvSource -> Maybe Text
groupFiles :: Prelude.Maybe Prelude.Text,
    -- | The target group size in bytes. The default is computed based on the
    -- input data size and the size of your cluster. When there are fewer than
    -- 50,000 input files, @\"groupFiles\"@ must be set to @\"inPartition\"@
    -- for this to take effect.
    S3CsvSource -> Maybe Text
groupSize :: Prelude.Maybe Prelude.Text,
    -- | This option controls the duration in milliseconds after which the s3
    -- listing is likely to be consistent. Files with modification timestamps
    -- falling within the last maxBand milliseconds are tracked specially when
    -- using JobBookmarks to account for Amazon S3 eventual consistency. Most
    -- users don\'t need to set this option. The default is 900000
    -- milliseconds, or 15 minutes.
    S3CsvSource -> Maybe Natural
maxBand :: Prelude.Maybe Prelude.Natural,
    -- | This option specifies the maximum number of files to save from the last
    -- maxBand seconds. If this number is exceeded, extra files are skipped and
    -- only processed in the next job run.
    S3CsvSource -> Maybe Natural
maxFilesInBand :: Prelude.Maybe Prelude.Natural,
    -- | A Boolean value that specifies whether a single record can span multiple
    -- lines. This can occur when a field contains a quoted new-line character.
    -- You must set this option to True if any record spans multiple lines. The
    -- default value is @False@, which allows for more aggressive
    -- file-splitting during parsing.
    S3CsvSource -> Maybe Bool
multiline :: Prelude.Maybe Prelude.Bool,
    -- | A Boolean value that specifies whether to use the advanced SIMD CSV
    -- reader along with Apache Arrow based columnar memory formats. Only
    -- available in Glue version 3.0.
    S3CsvSource -> Maybe Bool
optimizePerformance :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the data schema for the S3 CSV source.
    S3CsvSource -> Maybe [GlueSchema]
outputSchemas :: Prelude.Maybe [GlueSchema],
    -- | If set to true, recursively reads files in all subdirectories under the
    -- specified paths.
    S3CsvSource -> Maybe Bool
recurse :: Prelude.Maybe Prelude.Bool,
    -- | A Boolean value that specifies whether to skip the first data line. The
    -- default value is @False@.
    S3CsvSource -> Maybe Bool
skipFirst :: Prelude.Maybe Prelude.Bool,
    -- | A Boolean value that specifies whether to treat the first line as a
    -- header. The default value is @False@.
    S3CsvSource -> Maybe Bool
withHeader :: Prelude.Maybe Prelude.Bool,
    -- | A Boolean value that specifies whether to write the header to output.
    -- The default value is @True@.
    S3CsvSource -> Maybe Bool
writeHeader :: Prelude.Maybe Prelude.Bool,
    -- | The name of the data store.
    S3CsvSource -> Text
name :: Prelude.Text,
    -- | A list of the Amazon S3 paths to read from.
    S3CsvSource -> [Text]
paths :: [Prelude.Text],
    -- | Specifies the delimiter character. The default is a comma: \",\", but
    -- any other character can be specified.
    S3CsvSource -> Separator
separator :: Separator,
    -- | Specifies the character to use for quoting. The default is a double
    -- quote: @\'\"\'@. Set this to @-1@ to turn off quoting entirely.
    S3CsvSource -> QuoteChar
quoteChar :: QuoteChar
  }
  deriving (S3CsvSource -> S3CsvSource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3CsvSource -> S3CsvSource -> Bool
$c/= :: S3CsvSource -> S3CsvSource -> Bool
== :: S3CsvSource -> S3CsvSource -> Bool
$c== :: S3CsvSource -> S3CsvSource -> Bool
Prelude.Eq, ReadPrec [S3CsvSource]
ReadPrec S3CsvSource
Int -> ReadS S3CsvSource
ReadS [S3CsvSource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3CsvSource]
$creadListPrec :: ReadPrec [S3CsvSource]
readPrec :: ReadPrec S3CsvSource
$creadPrec :: ReadPrec S3CsvSource
readList :: ReadS [S3CsvSource]
$creadList :: ReadS [S3CsvSource]
readsPrec :: Int -> ReadS S3CsvSource
$creadsPrec :: Int -> ReadS S3CsvSource
Prelude.Read, Int -> S3CsvSource -> ShowS
[S3CsvSource] -> ShowS
S3CsvSource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3CsvSource] -> ShowS
$cshowList :: [S3CsvSource] -> ShowS
show :: S3CsvSource -> String
$cshow :: S3CsvSource -> String
showsPrec :: Int -> S3CsvSource -> ShowS
$cshowsPrec :: Int -> S3CsvSource -> ShowS
Prelude.Show, forall x. Rep S3CsvSource x -> S3CsvSource
forall x. S3CsvSource -> Rep S3CsvSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep S3CsvSource x -> S3CsvSource
$cfrom :: forall x. S3CsvSource -> Rep S3CsvSource x
Prelude.Generic)

-- |
-- Create a value of 'S3CsvSource' 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:
--
-- 'additionalOptions', 's3CsvSource_additionalOptions' - Specifies additional connection options.
--
-- 'compressionType', 's3CsvSource_compressionType' - Specifies how the data is compressed. This is generally not necessary if
-- the data has a standard file extension. Possible values are @\"gzip\"@
-- and @\"bzip\"@).
--
-- 'escaper', 's3CsvSource_escaper' - Specifies a character to use for escaping. This option is used only when
-- reading CSV files. The default value is @none@. If enabled, the
-- character which immediately follows is used as-is, except for a small
-- set of well-known escapes (@\\n@, @\\r@, @\\t@, and @\\0@).
--
-- 'exclusions', 's3CsvSource_exclusions' - A string containing a JSON list of Unix-style glob patterns to exclude.
-- For example, \"[\\\"**.pdf\\\"]\" excludes all PDF files.
--
-- 'groupFiles', 's3CsvSource_groupFiles' - Grouping files is turned on by default when the input contains more than
-- 50,000 files. To turn on grouping with fewer than 50,000 files, set this
-- parameter to \"inPartition\". To disable grouping when there are more
-- than 50,000 files, set this parameter to @\"none\"@.
--
-- 'groupSize', 's3CsvSource_groupSize' - The target group size in bytes. The default is computed based on the
-- input data size and the size of your cluster. When there are fewer than
-- 50,000 input files, @\"groupFiles\"@ must be set to @\"inPartition\"@
-- for this to take effect.
--
-- 'maxBand', 's3CsvSource_maxBand' - This option controls the duration in milliseconds after which the s3
-- listing is likely to be consistent. Files with modification timestamps
-- falling within the last maxBand milliseconds are tracked specially when
-- using JobBookmarks to account for Amazon S3 eventual consistency. Most
-- users don\'t need to set this option. The default is 900000
-- milliseconds, or 15 minutes.
--
-- 'maxFilesInBand', 's3CsvSource_maxFilesInBand' - This option specifies the maximum number of files to save from the last
-- maxBand seconds. If this number is exceeded, extra files are skipped and
-- only processed in the next job run.
--
-- 'multiline', 's3CsvSource_multiline' - A Boolean value that specifies whether a single record can span multiple
-- lines. This can occur when a field contains a quoted new-line character.
-- You must set this option to True if any record spans multiple lines. The
-- default value is @False@, which allows for more aggressive
-- file-splitting during parsing.
--
-- 'optimizePerformance', 's3CsvSource_optimizePerformance' - A Boolean value that specifies whether to use the advanced SIMD CSV
-- reader along with Apache Arrow based columnar memory formats. Only
-- available in Glue version 3.0.
--
-- 'outputSchemas', 's3CsvSource_outputSchemas' - Specifies the data schema for the S3 CSV source.
--
-- 'recurse', 's3CsvSource_recurse' - If set to true, recursively reads files in all subdirectories under the
-- specified paths.
--
-- 'skipFirst', 's3CsvSource_skipFirst' - A Boolean value that specifies whether to skip the first data line. The
-- default value is @False@.
--
-- 'withHeader', 's3CsvSource_withHeader' - A Boolean value that specifies whether to treat the first line as a
-- header. The default value is @False@.
--
-- 'writeHeader', 's3CsvSource_writeHeader' - A Boolean value that specifies whether to write the header to output.
-- The default value is @True@.
--
-- 'name', 's3CsvSource_name' - The name of the data store.
--
-- 'paths', 's3CsvSource_paths' - A list of the Amazon S3 paths to read from.
--
-- 'separator', 's3CsvSource_separator' - Specifies the delimiter character. The default is a comma: \",\", but
-- any other character can be specified.
--
-- 'quoteChar', 's3CsvSource_quoteChar' - Specifies the character to use for quoting. The default is a double
-- quote: @\'\"\'@. Set this to @-1@ to turn off quoting entirely.
newS3CsvSource ::
  -- | 'name'
  Prelude.Text ->
  -- | 'separator'
  Separator ->
  -- | 'quoteChar'
  QuoteChar ->
  S3CsvSource
newS3CsvSource :: Text -> Separator -> QuoteChar -> S3CsvSource
newS3CsvSource Text
pName_ Separator
pSeparator_ QuoteChar
pQuoteChar_ =
  S3CsvSource'
    { $sel:additionalOptions:S3CsvSource' :: Maybe S3DirectSourceAdditionalOptions
additionalOptions = forall a. Maybe a
Prelude.Nothing,
      $sel:compressionType:S3CsvSource' :: Maybe CompressionType
compressionType = forall a. Maybe a
Prelude.Nothing,
      $sel:escaper:S3CsvSource' :: Maybe Text
escaper = forall a. Maybe a
Prelude.Nothing,
      $sel:exclusions:S3CsvSource' :: Maybe [Text]
exclusions = forall a. Maybe a
Prelude.Nothing,
      $sel:groupFiles:S3CsvSource' :: Maybe Text
groupFiles = forall a. Maybe a
Prelude.Nothing,
      $sel:groupSize:S3CsvSource' :: Maybe Text
groupSize = forall a. Maybe a
Prelude.Nothing,
      $sel:maxBand:S3CsvSource' :: Maybe Natural
maxBand = forall a. Maybe a
Prelude.Nothing,
      $sel:maxFilesInBand:S3CsvSource' :: Maybe Natural
maxFilesInBand = forall a. Maybe a
Prelude.Nothing,
      $sel:multiline:S3CsvSource' :: Maybe Bool
multiline = forall a. Maybe a
Prelude.Nothing,
      $sel:optimizePerformance:S3CsvSource' :: Maybe Bool
optimizePerformance = forall a. Maybe a
Prelude.Nothing,
      $sel:outputSchemas:S3CsvSource' :: Maybe [GlueSchema]
outputSchemas = forall a. Maybe a
Prelude.Nothing,
      $sel:recurse:S3CsvSource' :: Maybe Bool
recurse = forall a. Maybe a
Prelude.Nothing,
      $sel:skipFirst:S3CsvSource' :: Maybe Bool
skipFirst = forall a. Maybe a
Prelude.Nothing,
      $sel:withHeader:S3CsvSource' :: Maybe Bool
withHeader = forall a. Maybe a
Prelude.Nothing,
      $sel:writeHeader:S3CsvSource' :: Maybe Bool
writeHeader = forall a. Maybe a
Prelude.Nothing,
      $sel:name:S3CsvSource' :: Text
name = Text
pName_,
      $sel:paths:S3CsvSource' :: [Text]
paths = forall a. Monoid a => a
Prelude.mempty,
      $sel:separator:S3CsvSource' :: Separator
separator = Separator
pSeparator_,
      $sel:quoteChar:S3CsvSource' :: QuoteChar
quoteChar = QuoteChar
pQuoteChar_
    }

-- | Specifies additional connection options.
s3CsvSource_additionalOptions :: Lens.Lens' S3CsvSource (Prelude.Maybe S3DirectSourceAdditionalOptions)
s3CsvSource_additionalOptions :: Lens' S3CsvSource (Maybe S3DirectSourceAdditionalOptions)
s3CsvSource_additionalOptions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Maybe S3DirectSourceAdditionalOptions
additionalOptions :: Maybe S3DirectSourceAdditionalOptions
$sel:additionalOptions:S3CsvSource' :: S3CsvSource -> Maybe S3DirectSourceAdditionalOptions
additionalOptions} -> Maybe S3DirectSourceAdditionalOptions
additionalOptions) (\s :: S3CsvSource
s@S3CsvSource' {} Maybe S3DirectSourceAdditionalOptions
a -> S3CsvSource
s {$sel:additionalOptions:S3CsvSource' :: Maybe S3DirectSourceAdditionalOptions
additionalOptions = Maybe S3DirectSourceAdditionalOptions
a} :: S3CsvSource)

-- | Specifies how the data is compressed. This is generally not necessary if
-- the data has a standard file extension. Possible values are @\"gzip\"@
-- and @\"bzip\"@).
s3CsvSource_compressionType :: Lens.Lens' S3CsvSource (Prelude.Maybe CompressionType)
s3CsvSource_compressionType :: Lens' S3CsvSource (Maybe CompressionType)
s3CsvSource_compressionType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Maybe CompressionType
compressionType :: Maybe CompressionType
$sel:compressionType:S3CsvSource' :: S3CsvSource -> Maybe CompressionType
compressionType} -> Maybe CompressionType
compressionType) (\s :: S3CsvSource
s@S3CsvSource' {} Maybe CompressionType
a -> S3CsvSource
s {$sel:compressionType:S3CsvSource' :: Maybe CompressionType
compressionType = Maybe CompressionType
a} :: S3CsvSource)

-- | Specifies a character to use for escaping. This option is used only when
-- reading CSV files. The default value is @none@. If enabled, the
-- character which immediately follows is used as-is, except for a small
-- set of well-known escapes (@\\n@, @\\r@, @\\t@, and @\\0@).
s3CsvSource_escaper :: Lens.Lens' S3CsvSource (Prelude.Maybe Prelude.Text)
s3CsvSource_escaper :: Lens' S3CsvSource (Maybe Text)
s3CsvSource_escaper = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Maybe Text
escaper :: Maybe Text
$sel:escaper:S3CsvSource' :: S3CsvSource -> Maybe Text
escaper} -> Maybe Text
escaper) (\s :: S3CsvSource
s@S3CsvSource' {} Maybe Text
a -> S3CsvSource
s {$sel:escaper:S3CsvSource' :: Maybe Text
escaper = Maybe Text
a} :: S3CsvSource)

-- | A string containing a JSON list of Unix-style glob patterns to exclude.
-- For example, \"[\\\"**.pdf\\\"]\" excludes all PDF files.
s3CsvSource_exclusions :: Lens.Lens' S3CsvSource (Prelude.Maybe [Prelude.Text])
s3CsvSource_exclusions :: Lens' S3CsvSource (Maybe [Text])
s3CsvSource_exclusions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Maybe [Text]
exclusions :: Maybe [Text]
$sel:exclusions:S3CsvSource' :: S3CsvSource -> Maybe [Text]
exclusions} -> Maybe [Text]
exclusions) (\s :: S3CsvSource
s@S3CsvSource' {} Maybe [Text]
a -> S3CsvSource
s {$sel:exclusions:S3CsvSource' :: Maybe [Text]
exclusions = Maybe [Text]
a} :: S3CsvSource) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Grouping files is turned on by default when the input contains more than
-- 50,000 files. To turn on grouping with fewer than 50,000 files, set this
-- parameter to \"inPartition\". To disable grouping when there are more
-- than 50,000 files, set this parameter to @\"none\"@.
s3CsvSource_groupFiles :: Lens.Lens' S3CsvSource (Prelude.Maybe Prelude.Text)
s3CsvSource_groupFiles :: Lens' S3CsvSource (Maybe Text)
s3CsvSource_groupFiles = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Maybe Text
groupFiles :: Maybe Text
$sel:groupFiles:S3CsvSource' :: S3CsvSource -> Maybe Text
groupFiles} -> Maybe Text
groupFiles) (\s :: S3CsvSource
s@S3CsvSource' {} Maybe Text
a -> S3CsvSource
s {$sel:groupFiles:S3CsvSource' :: Maybe Text
groupFiles = Maybe Text
a} :: S3CsvSource)

-- | The target group size in bytes. The default is computed based on the
-- input data size and the size of your cluster. When there are fewer than
-- 50,000 input files, @\"groupFiles\"@ must be set to @\"inPartition\"@
-- for this to take effect.
s3CsvSource_groupSize :: Lens.Lens' S3CsvSource (Prelude.Maybe Prelude.Text)
s3CsvSource_groupSize :: Lens' S3CsvSource (Maybe Text)
s3CsvSource_groupSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Maybe Text
groupSize :: Maybe Text
$sel:groupSize:S3CsvSource' :: S3CsvSource -> Maybe Text
groupSize} -> Maybe Text
groupSize) (\s :: S3CsvSource
s@S3CsvSource' {} Maybe Text
a -> S3CsvSource
s {$sel:groupSize:S3CsvSource' :: Maybe Text
groupSize = Maybe Text
a} :: S3CsvSource)

-- | This option controls the duration in milliseconds after which the s3
-- listing is likely to be consistent. Files with modification timestamps
-- falling within the last maxBand milliseconds are tracked specially when
-- using JobBookmarks to account for Amazon S3 eventual consistency. Most
-- users don\'t need to set this option. The default is 900000
-- milliseconds, or 15 minutes.
s3CsvSource_maxBand :: Lens.Lens' S3CsvSource (Prelude.Maybe Prelude.Natural)
s3CsvSource_maxBand :: Lens' S3CsvSource (Maybe Natural)
s3CsvSource_maxBand = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Maybe Natural
maxBand :: Maybe Natural
$sel:maxBand:S3CsvSource' :: S3CsvSource -> Maybe Natural
maxBand} -> Maybe Natural
maxBand) (\s :: S3CsvSource
s@S3CsvSource' {} Maybe Natural
a -> S3CsvSource
s {$sel:maxBand:S3CsvSource' :: Maybe Natural
maxBand = Maybe Natural
a} :: S3CsvSource)

-- | This option specifies the maximum number of files to save from the last
-- maxBand seconds. If this number is exceeded, extra files are skipped and
-- only processed in the next job run.
s3CsvSource_maxFilesInBand :: Lens.Lens' S3CsvSource (Prelude.Maybe Prelude.Natural)
s3CsvSource_maxFilesInBand :: Lens' S3CsvSource (Maybe Natural)
s3CsvSource_maxFilesInBand = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Maybe Natural
maxFilesInBand :: Maybe Natural
$sel:maxFilesInBand:S3CsvSource' :: S3CsvSource -> Maybe Natural
maxFilesInBand} -> Maybe Natural
maxFilesInBand) (\s :: S3CsvSource
s@S3CsvSource' {} Maybe Natural
a -> S3CsvSource
s {$sel:maxFilesInBand:S3CsvSource' :: Maybe Natural
maxFilesInBand = Maybe Natural
a} :: S3CsvSource)

-- | A Boolean value that specifies whether a single record can span multiple
-- lines. This can occur when a field contains a quoted new-line character.
-- You must set this option to True if any record spans multiple lines. The
-- default value is @False@, which allows for more aggressive
-- file-splitting during parsing.
s3CsvSource_multiline :: Lens.Lens' S3CsvSource (Prelude.Maybe Prelude.Bool)
s3CsvSource_multiline :: Lens' S3CsvSource (Maybe Bool)
s3CsvSource_multiline = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Maybe Bool
multiline :: Maybe Bool
$sel:multiline:S3CsvSource' :: S3CsvSource -> Maybe Bool
multiline} -> Maybe Bool
multiline) (\s :: S3CsvSource
s@S3CsvSource' {} Maybe Bool
a -> S3CsvSource
s {$sel:multiline:S3CsvSource' :: Maybe Bool
multiline = Maybe Bool
a} :: S3CsvSource)

-- | A Boolean value that specifies whether to use the advanced SIMD CSV
-- reader along with Apache Arrow based columnar memory formats. Only
-- available in Glue version 3.0.
s3CsvSource_optimizePerformance :: Lens.Lens' S3CsvSource (Prelude.Maybe Prelude.Bool)
s3CsvSource_optimizePerformance :: Lens' S3CsvSource (Maybe Bool)
s3CsvSource_optimizePerformance = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Maybe Bool
optimizePerformance :: Maybe Bool
$sel:optimizePerformance:S3CsvSource' :: S3CsvSource -> Maybe Bool
optimizePerformance} -> Maybe Bool
optimizePerformance) (\s :: S3CsvSource
s@S3CsvSource' {} Maybe Bool
a -> S3CsvSource
s {$sel:optimizePerformance:S3CsvSource' :: Maybe Bool
optimizePerformance = Maybe Bool
a} :: S3CsvSource)

-- | Specifies the data schema for the S3 CSV source.
s3CsvSource_outputSchemas :: Lens.Lens' S3CsvSource (Prelude.Maybe [GlueSchema])
s3CsvSource_outputSchemas :: Lens' S3CsvSource (Maybe [GlueSchema])
s3CsvSource_outputSchemas = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Maybe [GlueSchema]
outputSchemas :: Maybe [GlueSchema]
$sel:outputSchemas:S3CsvSource' :: S3CsvSource -> Maybe [GlueSchema]
outputSchemas} -> Maybe [GlueSchema]
outputSchemas) (\s :: S3CsvSource
s@S3CsvSource' {} Maybe [GlueSchema]
a -> S3CsvSource
s {$sel:outputSchemas:S3CsvSource' :: Maybe [GlueSchema]
outputSchemas = Maybe [GlueSchema]
a} :: S3CsvSource) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If set to true, recursively reads files in all subdirectories under the
-- specified paths.
s3CsvSource_recurse :: Lens.Lens' S3CsvSource (Prelude.Maybe Prelude.Bool)
s3CsvSource_recurse :: Lens' S3CsvSource (Maybe Bool)
s3CsvSource_recurse = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Maybe Bool
recurse :: Maybe Bool
$sel:recurse:S3CsvSource' :: S3CsvSource -> Maybe Bool
recurse} -> Maybe Bool
recurse) (\s :: S3CsvSource
s@S3CsvSource' {} Maybe Bool
a -> S3CsvSource
s {$sel:recurse:S3CsvSource' :: Maybe Bool
recurse = Maybe Bool
a} :: S3CsvSource)

-- | A Boolean value that specifies whether to skip the first data line. The
-- default value is @False@.
s3CsvSource_skipFirst :: Lens.Lens' S3CsvSource (Prelude.Maybe Prelude.Bool)
s3CsvSource_skipFirst :: Lens' S3CsvSource (Maybe Bool)
s3CsvSource_skipFirst = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Maybe Bool
skipFirst :: Maybe Bool
$sel:skipFirst:S3CsvSource' :: S3CsvSource -> Maybe Bool
skipFirst} -> Maybe Bool
skipFirst) (\s :: S3CsvSource
s@S3CsvSource' {} Maybe Bool
a -> S3CsvSource
s {$sel:skipFirst:S3CsvSource' :: Maybe Bool
skipFirst = Maybe Bool
a} :: S3CsvSource)

-- | A Boolean value that specifies whether to treat the first line as a
-- header. The default value is @False@.
s3CsvSource_withHeader :: Lens.Lens' S3CsvSource (Prelude.Maybe Prelude.Bool)
s3CsvSource_withHeader :: Lens' S3CsvSource (Maybe Bool)
s3CsvSource_withHeader = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Maybe Bool
withHeader :: Maybe Bool
$sel:withHeader:S3CsvSource' :: S3CsvSource -> Maybe Bool
withHeader} -> Maybe Bool
withHeader) (\s :: S3CsvSource
s@S3CsvSource' {} Maybe Bool
a -> S3CsvSource
s {$sel:withHeader:S3CsvSource' :: Maybe Bool
withHeader = Maybe Bool
a} :: S3CsvSource)

-- | A Boolean value that specifies whether to write the header to output.
-- The default value is @True@.
s3CsvSource_writeHeader :: Lens.Lens' S3CsvSource (Prelude.Maybe Prelude.Bool)
s3CsvSource_writeHeader :: Lens' S3CsvSource (Maybe Bool)
s3CsvSource_writeHeader = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Maybe Bool
writeHeader :: Maybe Bool
$sel:writeHeader:S3CsvSource' :: S3CsvSource -> Maybe Bool
writeHeader} -> Maybe Bool
writeHeader) (\s :: S3CsvSource
s@S3CsvSource' {} Maybe Bool
a -> S3CsvSource
s {$sel:writeHeader:S3CsvSource' :: Maybe Bool
writeHeader = Maybe Bool
a} :: S3CsvSource)

-- | The name of the data store.
s3CsvSource_name :: Lens.Lens' S3CsvSource Prelude.Text
s3CsvSource_name :: Lens' S3CsvSource Text
s3CsvSource_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Text
name :: Text
$sel:name:S3CsvSource' :: S3CsvSource -> Text
name} -> Text
name) (\s :: S3CsvSource
s@S3CsvSource' {} Text
a -> S3CsvSource
s {$sel:name:S3CsvSource' :: Text
name = Text
a} :: S3CsvSource)

-- | A list of the Amazon S3 paths to read from.
s3CsvSource_paths :: Lens.Lens' S3CsvSource [Prelude.Text]
s3CsvSource_paths :: Lens' S3CsvSource [Text]
s3CsvSource_paths = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {[Text]
paths :: [Text]
$sel:paths:S3CsvSource' :: S3CsvSource -> [Text]
paths} -> [Text]
paths) (\s :: S3CsvSource
s@S3CsvSource' {} [Text]
a -> S3CsvSource
s {$sel:paths:S3CsvSource' :: [Text]
paths = [Text]
a} :: S3CsvSource) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Specifies the delimiter character. The default is a comma: \",\", but
-- any other character can be specified.
s3CsvSource_separator :: Lens.Lens' S3CsvSource Separator
s3CsvSource_separator :: Lens' S3CsvSource Separator
s3CsvSource_separator = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {Separator
separator :: Separator
$sel:separator:S3CsvSource' :: S3CsvSource -> Separator
separator} -> Separator
separator) (\s :: S3CsvSource
s@S3CsvSource' {} Separator
a -> S3CsvSource
s {$sel:separator:S3CsvSource' :: Separator
separator = Separator
a} :: S3CsvSource)

-- | Specifies the character to use for quoting. The default is a double
-- quote: @\'\"\'@. Set this to @-1@ to turn off quoting entirely.
s3CsvSource_quoteChar :: Lens.Lens' S3CsvSource QuoteChar
s3CsvSource_quoteChar :: Lens' S3CsvSource QuoteChar
s3CsvSource_quoteChar = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3CsvSource' {QuoteChar
quoteChar :: QuoteChar
$sel:quoteChar:S3CsvSource' :: S3CsvSource -> QuoteChar
quoteChar} -> QuoteChar
quoteChar) (\s :: S3CsvSource
s@S3CsvSource' {} QuoteChar
a -> S3CsvSource
s {$sel:quoteChar:S3CsvSource' :: QuoteChar
quoteChar = QuoteChar
a} :: S3CsvSource)

instance Data.FromJSON S3CsvSource where
  parseJSON :: Value -> Parser S3CsvSource
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"S3CsvSource"
      ( \Object
x ->
          Maybe S3DirectSourceAdditionalOptions
-> Maybe CompressionType
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Bool
-> Maybe Bool
-> Maybe [GlueSchema]
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Text
-> [Text]
-> Separator
-> QuoteChar
-> S3CsvSource
S3CsvSource'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"AdditionalOptions")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CompressionType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Escaper")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Exclusions" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"GroupFiles")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"GroupSize")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MaxBand")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"MaxFilesInBand")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Multiline")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OptimizePerformance")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"OutputSchemas" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Recurse")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SkipFirst")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"WithHeader")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"WriteHeader")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Paths" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Separator")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"QuoteChar")
      )

instance Prelude.Hashable S3CsvSource where
  hashWithSalt :: Int -> S3CsvSource -> Int
hashWithSalt Int
_salt S3CsvSource' {[Text]
Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [GlueSchema]
Maybe Text
Maybe CompressionType
Maybe S3DirectSourceAdditionalOptions
Text
QuoteChar
Separator
quoteChar :: QuoteChar
separator :: Separator
paths :: [Text]
name :: Text
writeHeader :: Maybe Bool
withHeader :: Maybe Bool
skipFirst :: Maybe Bool
recurse :: Maybe Bool
outputSchemas :: Maybe [GlueSchema]
optimizePerformance :: Maybe Bool
multiline :: Maybe Bool
maxFilesInBand :: Maybe Natural
maxBand :: Maybe Natural
groupSize :: Maybe Text
groupFiles :: Maybe Text
exclusions :: Maybe [Text]
escaper :: Maybe Text
compressionType :: Maybe CompressionType
additionalOptions :: Maybe S3DirectSourceAdditionalOptions
$sel:quoteChar:S3CsvSource' :: S3CsvSource -> QuoteChar
$sel:separator:S3CsvSource' :: S3CsvSource -> Separator
$sel:paths:S3CsvSource' :: S3CsvSource -> [Text]
$sel:name:S3CsvSource' :: S3CsvSource -> Text
$sel:writeHeader:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:withHeader:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:skipFirst:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:recurse:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:outputSchemas:S3CsvSource' :: S3CsvSource -> Maybe [GlueSchema]
$sel:optimizePerformance:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:multiline:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:maxFilesInBand:S3CsvSource' :: S3CsvSource -> Maybe Natural
$sel:maxBand:S3CsvSource' :: S3CsvSource -> Maybe Natural
$sel:groupSize:S3CsvSource' :: S3CsvSource -> Maybe Text
$sel:groupFiles:S3CsvSource' :: S3CsvSource -> Maybe Text
$sel:exclusions:S3CsvSource' :: S3CsvSource -> Maybe [Text]
$sel:escaper:S3CsvSource' :: S3CsvSource -> Maybe Text
$sel:compressionType:S3CsvSource' :: S3CsvSource -> Maybe CompressionType
$sel:additionalOptions:S3CsvSource' :: S3CsvSource -> Maybe S3DirectSourceAdditionalOptions
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe S3DirectSourceAdditionalOptions
additionalOptions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CompressionType
compressionType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
escaper
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
exclusions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupFiles
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupSize
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxBand
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxFilesInBand
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
multiline
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
optimizePerformance
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [GlueSchema]
outputSchemas
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
recurse
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
skipFirst
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
withHeader
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
writeHeader
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
paths
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Separator
separator
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` QuoteChar
quoteChar

instance Prelude.NFData S3CsvSource where
  rnf :: S3CsvSource -> ()
rnf S3CsvSource' {[Text]
Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [GlueSchema]
Maybe Text
Maybe CompressionType
Maybe S3DirectSourceAdditionalOptions
Text
QuoteChar
Separator
quoteChar :: QuoteChar
separator :: Separator
paths :: [Text]
name :: Text
writeHeader :: Maybe Bool
withHeader :: Maybe Bool
skipFirst :: Maybe Bool
recurse :: Maybe Bool
outputSchemas :: Maybe [GlueSchema]
optimizePerformance :: Maybe Bool
multiline :: Maybe Bool
maxFilesInBand :: Maybe Natural
maxBand :: Maybe Natural
groupSize :: Maybe Text
groupFiles :: Maybe Text
exclusions :: Maybe [Text]
escaper :: Maybe Text
compressionType :: Maybe CompressionType
additionalOptions :: Maybe S3DirectSourceAdditionalOptions
$sel:quoteChar:S3CsvSource' :: S3CsvSource -> QuoteChar
$sel:separator:S3CsvSource' :: S3CsvSource -> Separator
$sel:paths:S3CsvSource' :: S3CsvSource -> [Text]
$sel:name:S3CsvSource' :: S3CsvSource -> Text
$sel:writeHeader:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:withHeader:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:skipFirst:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:recurse:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:outputSchemas:S3CsvSource' :: S3CsvSource -> Maybe [GlueSchema]
$sel:optimizePerformance:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:multiline:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:maxFilesInBand:S3CsvSource' :: S3CsvSource -> Maybe Natural
$sel:maxBand:S3CsvSource' :: S3CsvSource -> Maybe Natural
$sel:groupSize:S3CsvSource' :: S3CsvSource -> Maybe Text
$sel:groupFiles:S3CsvSource' :: S3CsvSource -> Maybe Text
$sel:exclusions:S3CsvSource' :: S3CsvSource -> Maybe [Text]
$sel:escaper:S3CsvSource' :: S3CsvSource -> Maybe Text
$sel:compressionType:S3CsvSource' :: S3CsvSource -> Maybe CompressionType
$sel:additionalOptions:S3CsvSource' :: S3CsvSource -> Maybe S3DirectSourceAdditionalOptions
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe S3DirectSourceAdditionalOptions
additionalOptions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CompressionType
compressionType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
escaper
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
exclusions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groupFiles
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groupSize
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxBand
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxFilesInBand
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
multiline
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
optimizePerformance
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [GlueSchema]
outputSchemas
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
recurse
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
skipFirst
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
withHeader
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
writeHeader
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
paths
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Separator
separator
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf QuoteChar
quoteChar

instance Data.ToJSON S3CsvSource where
  toJSON :: S3CsvSource -> Value
toJSON S3CsvSource' {[Text]
Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [GlueSchema]
Maybe Text
Maybe CompressionType
Maybe S3DirectSourceAdditionalOptions
Text
QuoteChar
Separator
quoteChar :: QuoteChar
separator :: Separator
paths :: [Text]
name :: Text
writeHeader :: Maybe Bool
withHeader :: Maybe Bool
skipFirst :: Maybe Bool
recurse :: Maybe Bool
outputSchemas :: Maybe [GlueSchema]
optimizePerformance :: Maybe Bool
multiline :: Maybe Bool
maxFilesInBand :: Maybe Natural
maxBand :: Maybe Natural
groupSize :: Maybe Text
groupFiles :: Maybe Text
exclusions :: Maybe [Text]
escaper :: Maybe Text
compressionType :: Maybe CompressionType
additionalOptions :: Maybe S3DirectSourceAdditionalOptions
$sel:quoteChar:S3CsvSource' :: S3CsvSource -> QuoteChar
$sel:separator:S3CsvSource' :: S3CsvSource -> Separator
$sel:paths:S3CsvSource' :: S3CsvSource -> [Text]
$sel:name:S3CsvSource' :: S3CsvSource -> Text
$sel:writeHeader:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:withHeader:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:skipFirst:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:recurse:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:outputSchemas:S3CsvSource' :: S3CsvSource -> Maybe [GlueSchema]
$sel:optimizePerformance:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:multiline:S3CsvSource' :: S3CsvSource -> Maybe Bool
$sel:maxFilesInBand:S3CsvSource' :: S3CsvSource -> Maybe Natural
$sel:maxBand:S3CsvSource' :: S3CsvSource -> Maybe Natural
$sel:groupSize:S3CsvSource' :: S3CsvSource -> Maybe Text
$sel:groupFiles:S3CsvSource' :: S3CsvSource -> Maybe Text
$sel:exclusions:S3CsvSource' :: S3CsvSource -> Maybe [Text]
$sel:escaper:S3CsvSource' :: S3CsvSource -> Maybe Text
$sel:compressionType:S3CsvSource' :: S3CsvSource -> Maybe CompressionType
$sel:additionalOptions:S3CsvSource' :: S3CsvSource -> Maybe S3DirectSourceAdditionalOptions
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AdditionalOptions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3DirectSourceAdditionalOptions
additionalOptions,
            (Key
"CompressionType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CompressionType
compressionType,
            (Key
"Escaper" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
escaper,
            (Key
"Exclusions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
exclusions,
            (Key
"GroupFiles" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
groupFiles,
            (Key
"GroupSize" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
groupSize,
            (Key
"MaxBand" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxBand,
            (Key
"MaxFilesInBand" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxFilesInBand,
            (Key
"Multiline" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
multiline,
            (Key
"OptimizePerformance" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
optimizePerformance,
            (Key
"OutputSchemas" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [GlueSchema]
outputSchemas,
            (Key
"Recurse" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
recurse,
            (Key
"SkipFirst" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
skipFirst,
            (Key
"WithHeader" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
withHeader,
            (Key
"WriteHeader" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
writeHeader,
            forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
            forall a. a -> Maybe a
Prelude.Just (Key
"Paths" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [Text]
paths),
            forall a. a -> Maybe a
Prelude.Just (Key
"Separator" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Separator
separator),
            forall a. a -> Maybe a
Prelude.Just (Key
"QuoteChar" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= QuoteChar
quoteChar)
          ]
      )