{-# 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.Comprehend.Types.DocumentClassifierInputDataConfig
-- 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.Comprehend.Types.DocumentClassifierInputDataConfig where

import Amazonka.Comprehend.Types.AugmentedManifestsListItem
import Amazonka.Comprehend.Types.DocumentClassifierDataFormat
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | The input properties for training a document classifier.
--
-- For more information on how the input file is formatted, see
-- <https://docs.aws.amazon.com/comprehend/latest/dg/prep-classifier-data.html Preparing training data>
-- in the Comprehend Developer Guide.
--
-- /See:/ 'newDocumentClassifierInputDataConfig' smart constructor.
data DocumentClassifierInputDataConfig = DocumentClassifierInputDataConfig'
  { -- | A list of augmented manifest files that provide training data for your
    -- custom model. An augmented manifest file is a labeled dataset that is
    -- produced by Amazon SageMaker Ground Truth.
    --
    -- This parameter is required if you set @DataFormat@ to
    -- @AUGMENTED_MANIFEST@.
    DocumentClassifierInputDataConfig
-> Maybe [AugmentedManifestsListItem]
augmentedManifests :: Prelude.Maybe [AugmentedManifestsListItem],
    -- | The format of your training data:
    --
    -- -   @COMPREHEND_CSV@: A two-column CSV file, where labels are provided
    --     in the first column, and documents are provided in the second. If
    --     you use this value, you must provide the @S3Uri@ parameter in your
    --     request.
    --
    -- -   @AUGMENTED_MANIFEST@: A labeled dataset that is produced by Amazon
    --     SageMaker Ground Truth. This file is in JSON lines format. Each line
    --     is a complete JSON object that contains a training document and its
    --     associated labels.
    --
    --     If you use this value, you must provide the @AugmentedManifests@
    --     parameter in your request.
    --
    -- If you don\'t specify a value, Amazon Comprehend uses @COMPREHEND_CSV@
    -- as the default.
    DocumentClassifierInputDataConfig
-> Maybe DocumentClassifierDataFormat
dataFormat :: Prelude.Maybe DocumentClassifierDataFormat,
    -- | Indicates the delimiter used to separate each label for training a
    -- multi-label classifier. The default delimiter between labels is a pipe
    -- (|). You can use a different character as a delimiter (if it\'s an
    -- allowed character) by specifying it under Delimiter for labels. If the
    -- training documents use a delimiter other than the default or the
    -- delimiter you specify, the labels on that line will be combined to make
    -- a single unique label, such as LABELLABELLABEL.
    DocumentClassifierInputDataConfig -> Maybe Text
labelDelimiter :: Prelude.Maybe Prelude.Text,
    -- | The Amazon S3 URI for the input data. The S3 bucket must be in the same
    -- region as the API endpoint that you are calling. The URI can point to a
    -- single input file or it can provide the prefix for a collection of input
    -- files.
    --
    -- For example, if you use the URI @S3:\/\/bucketName\/prefix@, if the
    -- prefix is a single file, Amazon Comprehend uses that file as input. If
    -- more than one file begins with the prefix, Amazon Comprehend uses all of
    -- them as input.
    --
    -- This parameter is required if you set @DataFormat@ to @COMPREHEND_CSV@.
    DocumentClassifierInputDataConfig -> Maybe Text
s3Uri :: Prelude.Maybe Prelude.Text,
    -- | This specifies the Amazon S3 location where the test annotations for an
    -- entity recognizer are located. The URI must be in the same AWS Region as
    -- the API endpoint that you are calling.
    DocumentClassifierInputDataConfig -> Maybe Text
testS3Uri :: Prelude.Maybe Prelude.Text
  }
  deriving (DocumentClassifierInputDataConfig
-> DocumentClassifierInputDataConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DocumentClassifierInputDataConfig
-> DocumentClassifierInputDataConfig -> Bool
$c/= :: DocumentClassifierInputDataConfig
-> DocumentClassifierInputDataConfig -> Bool
== :: DocumentClassifierInputDataConfig
-> DocumentClassifierInputDataConfig -> Bool
$c== :: DocumentClassifierInputDataConfig
-> DocumentClassifierInputDataConfig -> Bool
Prelude.Eq, ReadPrec [DocumentClassifierInputDataConfig]
ReadPrec DocumentClassifierInputDataConfig
Int -> ReadS DocumentClassifierInputDataConfig
ReadS [DocumentClassifierInputDataConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DocumentClassifierInputDataConfig]
$creadListPrec :: ReadPrec [DocumentClassifierInputDataConfig]
readPrec :: ReadPrec DocumentClassifierInputDataConfig
$creadPrec :: ReadPrec DocumentClassifierInputDataConfig
readList :: ReadS [DocumentClassifierInputDataConfig]
$creadList :: ReadS [DocumentClassifierInputDataConfig]
readsPrec :: Int -> ReadS DocumentClassifierInputDataConfig
$creadsPrec :: Int -> ReadS DocumentClassifierInputDataConfig
Prelude.Read, Int -> DocumentClassifierInputDataConfig -> ShowS
[DocumentClassifierInputDataConfig] -> ShowS
DocumentClassifierInputDataConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DocumentClassifierInputDataConfig] -> ShowS
$cshowList :: [DocumentClassifierInputDataConfig] -> ShowS
show :: DocumentClassifierInputDataConfig -> String
$cshow :: DocumentClassifierInputDataConfig -> String
showsPrec :: Int -> DocumentClassifierInputDataConfig -> ShowS
$cshowsPrec :: Int -> DocumentClassifierInputDataConfig -> ShowS
Prelude.Show, forall x.
Rep DocumentClassifierInputDataConfig x
-> DocumentClassifierInputDataConfig
forall x.
DocumentClassifierInputDataConfig
-> Rep DocumentClassifierInputDataConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DocumentClassifierInputDataConfig x
-> DocumentClassifierInputDataConfig
$cfrom :: forall x.
DocumentClassifierInputDataConfig
-> Rep DocumentClassifierInputDataConfig x
Prelude.Generic)

-- |
-- Create a value of 'DocumentClassifierInputDataConfig' 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:
--
-- 'augmentedManifests', 'documentClassifierInputDataConfig_augmentedManifests' - A list of augmented manifest files that provide training data for your
-- custom model. An augmented manifest file is a labeled dataset that is
-- produced by Amazon SageMaker Ground Truth.
--
-- This parameter is required if you set @DataFormat@ to
-- @AUGMENTED_MANIFEST@.
--
-- 'dataFormat', 'documentClassifierInputDataConfig_dataFormat' - The format of your training data:
--
-- -   @COMPREHEND_CSV@: A two-column CSV file, where labels are provided
--     in the first column, and documents are provided in the second. If
--     you use this value, you must provide the @S3Uri@ parameter in your
--     request.
--
-- -   @AUGMENTED_MANIFEST@: A labeled dataset that is produced by Amazon
--     SageMaker Ground Truth. This file is in JSON lines format. Each line
--     is a complete JSON object that contains a training document and its
--     associated labels.
--
--     If you use this value, you must provide the @AugmentedManifests@
--     parameter in your request.
--
-- If you don\'t specify a value, Amazon Comprehend uses @COMPREHEND_CSV@
-- as the default.
--
-- 'labelDelimiter', 'documentClassifierInputDataConfig_labelDelimiter' - Indicates the delimiter used to separate each label for training a
-- multi-label classifier. The default delimiter between labels is a pipe
-- (|). You can use a different character as a delimiter (if it\'s an
-- allowed character) by specifying it under Delimiter for labels. If the
-- training documents use a delimiter other than the default or the
-- delimiter you specify, the labels on that line will be combined to make
-- a single unique label, such as LABELLABELLABEL.
--
-- 's3Uri', 'documentClassifierInputDataConfig_s3Uri' - The Amazon S3 URI for the input data. The S3 bucket must be in the same
-- region as the API endpoint that you are calling. The URI can point to a
-- single input file or it can provide the prefix for a collection of input
-- files.
--
-- For example, if you use the URI @S3:\/\/bucketName\/prefix@, if the
-- prefix is a single file, Amazon Comprehend uses that file as input. If
-- more than one file begins with the prefix, Amazon Comprehend uses all of
-- them as input.
--
-- This parameter is required if you set @DataFormat@ to @COMPREHEND_CSV@.
--
-- 'testS3Uri', 'documentClassifierInputDataConfig_testS3Uri' - This specifies the Amazon S3 location where the test annotations for an
-- entity recognizer are located. The URI must be in the same AWS Region as
-- the API endpoint that you are calling.
newDocumentClassifierInputDataConfig ::
  DocumentClassifierInputDataConfig
newDocumentClassifierInputDataConfig :: DocumentClassifierInputDataConfig
newDocumentClassifierInputDataConfig =
  DocumentClassifierInputDataConfig'
    { $sel:augmentedManifests:DocumentClassifierInputDataConfig' :: Maybe [AugmentedManifestsListItem]
augmentedManifests =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dataFormat:DocumentClassifierInputDataConfig' :: Maybe DocumentClassifierDataFormat
dataFormat = forall a. Maybe a
Prelude.Nothing,
      $sel:labelDelimiter:DocumentClassifierInputDataConfig' :: Maybe Text
labelDelimiter = forall a. Maybe a
Prelude.Nothing,
      $sel:s3Uri:DocumentClassifierInputDataConfig' :: Maybe Text
s3Uri = forall a. Maybe a
Prelude.Nothing,
      $sel:testS3Uri:DocumentClassifierInputDataConfig' :: Maybe Text
testS3Uri = forall a. Maybe a
Prelude.Nothing
    }

-- | A list of augmented manifest files that provide training data for your
-- custom model. An augmented manifest file is a labeled dataset that is
-- produced by Amazon SageMaker Ground Truth.
--
-- This parameter is required if you set @DataFormat@ to
-- @AUGMENTED_MANIFEST@.
documentClassifierInputDataConfig_augmentedManifests :: Lens.Lens' DocumentClassifierInputDataConfig (Prelude.Maybe [AugmentedManifestsListItem])
documentClassifierInputDataConfig_augmentedManifests :: Lens'
  DocumentClassifierInputDataConfig
  (Maybe [AugmentedManifestsListItem])
documentClassifierInputDataConfig_augmentedManifests = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentClassifierInputDataConfig' {Maybe [AugmentedManifestsListItem]
augmentedManifests :: Maybe [AugmentedManifestsListItem]
$sel:augmentedManifests:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig
-> Maybe [AugmentedManifestsListItem]
augmentedManifests} -> Maybe [AugmentedManifestsListItem]
augmentedManifests) (\s :: DocumentClassifierInputDataConfig
s@DocumentClassifierInputDataConfig' {} Maybe [AugmentedManifestsListItem]
a -> DocumentClassifierInputDataConfig
s {$sel:augmentedManifests:DocumentClassifierInputDataConfig' :: Maybe [AugmentedManifestsListItem]
augmentedManifests = Maybe [AugmentedManifestsListItem]
a} :: DocumentClassifierInputDataConfig) 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

-- | The format of your training data:
--
-- -   @COMPREHEND_CSV@: A two-column CSV file, where labels are provided
--     in the first column, and documents are provided in the second. If
--     you use this value, you must provide the @S3Uri@ parameter in your
--     request.
--
-- -   @AUGMENTED_MANIFEST@: A labeled dataset that is produced by Amazon
--     SageMaker Ground Truth. This file is in JSON lines format. Each line
--     is a complete JSON object that contains a training document and its
--     associated labels.
--
--     If you use this value, you must provide the @AugmentedManifests@
--     parameter in your request.
--
-- If you don\'t specify a value, Amazon Comprehend uses @COMPREHEND_CSV@
-- as the default.
documentClassifierInputDataConfig_dataFormat :: Lens.Lens' DocumentClassifierInputDataConfig (Prelude.Maybe DocumentClassifierDataFormat)
documentClassifierInputDataConfig_dataFormat :: Lens'
  DocumentClassifierInputDataConfig
  (Maybe DocumentClassifierDataFormat)
documentClassifierInputDataConfig_dataFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentClassifierInputDataConfig' {Maybe DocumentClassifierDataFormat
dataFormat :: Maybe DocumentClassifierDataFormat
$sel:dataFormat:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig
-> Maybe DocumentClassifierDataFormat
dataFormat} -> Maybe DocumentClassifierDataFormat
dataFormat) (\s :: DocumentClassifierInputDataConfig
s@DocumentClassifierInputDataConfig' {} Maybe DocumentClassifierDataFormat
a -> DocumentClassifierInputDataConfig
s {$sel:dataFormat:DocumentClassifierInputDataConfig' :: Maybe DocumentClassifierDataFormat
dataFormat = Maybe DocumentClassifierDataFormat
a} :: DocumentClassifierInputDataConfig)

-- | Indicates the delimiter used to separate each label for training a
-- multi-label classifier. The default delimiter between labels is a pipe
-- (|). You can use a different character as a delimiter (if it\'s an
-- allowed character) by specifying it under Delimiter for labels. If the
-- training documents use a delimiter other than the default or the
-- delimiter you specify, the labels on that line will be combined to make
-- a single unique label, such as LABELLABELLABEL.
documentClassifierInputDataConfig_labelDelimiter :: Lens.Lens' DocumentClassifierInputDataConfig (Prelude.Maybe Prelude.Text)
documentClassifierInputDataConfig_labelDelimiter :: Lens' DocumentClassifierInputDataConfig (Maybe Text)
documentClassifierInputDataConfig_labelDelimiter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentClassifierInputDataConfig' {Maybe Text
labelDelimiter :: Maybe Text
$sel:labelDelimiter:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig -> Maybe Text
labelDelimiter} -> Maybe Text
labelDelimiter) (\s :: DocumentClassifierInputDataConfig
s@DocumentClassifierInputDataConfig' {} Maybe Text
a -> DocumentClassifierInputDataConfig
s {$sel:labelDelimiter:DocumentClassifierInputDataConfig' :: Maybe Text
labelDelimiter = Maybe Text
a} :: DocumentClassifierInputDataConfig)

-- | The Amazon S3 URI for the input data. The S3 bucket must be in the same
-- region as the API endpoint that you are calling. The URI can point to a
-- single input file or it can provide the prefix for a collection of input
-- files.
--
-- For example, if you use the URI @S3:\/\/bucketName\/prefix@, if the
-- prefix is a single file, Amazon Comprehend uses that file as input. If
-- more than one file begins with the prefix, Amazon Comprehend uses all of
-- them as input.
--
-- This parameter is required if you set @DataFormat@ to @COMPREHEND_CSV@.
documentClassifierInputDataConfig_s3Uri :: Lens.Lens' DocumentClassifierInputDataConfig (Prelude.Maybe Prelude.Text)
documentClassifierInputDataConfig_s3Uri :: Lens' DocumentClassifierInputDataConfig (Maybe Text)
documentClassifierInputDataConfig_s3Uri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentClassifierInputDataConfig' {Maybe Text
s3Uri :: Maybe Text
$sel:s3Uri:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig -> Maybe Text
s3Uri} -> Maybe Text
s3Uri) (\s :: DocumentClassifierInputDataConfig
s@DocumentClassifierInputDataConfig' {} Maybe Text
a -> DocumentClassifierInputDataConfig
s {$sel:s3Uri:DocumentClassifierInputDataConfig' :: Maybe Text
s3Uri = Maybe Text
a} :: DocumentClassifierInputDataConfig)

-- | This specifies the Amazon S3 location where the test annotations for an
-- entity recognizer are located. The URI must be in the same AWS Region as
-- the API endpoint that you are calling.
documentClassifierInputDataConfig_testS3Uri :: Lens.Lens' DocumentClassifierInputDataConfig (Prelude.Maybe Prelude.Text)
documentClassifierInputDataConfig_testS3Uri :: Lens' DocumentClassifierInputDataConfig (Maybe Text)
documentClassifierInputDataConfig_testS3Uri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentClassifierInputDataConfig' {Maybe Text
testS3Uri :: Maybe Text
$sel:testS3Uri:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig -> Maybe Text
testS3Uri} -> Maybe Text
testS3Uri) (\s :: DocumentClassifierInputDataConfig
s@DocumentClassifierInputDataConfig' {} Maybe Text
a -> DocumentClassifierInputDataConfig
s {$sel:testS3Uri:DocumentClassifierInputDataConfig' :: Maybe Text
testS3Uri = Maybe Text
a} :: DocumentClassifierInputDataConfig)

instance
  Data.FromJSON
    DocumentClassifierInputDataConfig
  where
  parseJSON :: Value -> Parser DocumentClassifierInputDataConfig
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"DocumentClassifierInputDataConfig"
      ( \Object
x ->
          Maybe [AugmentedManifestsListItem]
-> Maybe DocumentClassifierDataFormat
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DocumentClassifierInputDataConfig
DocumentClassifierInputDataConfig'
            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
"AugmentedManifests"
                            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
"DataFormat")
            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
"LabelDelimiter")
            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
"S3Uri")
            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
"TestS3Uri")
      )

instance
  Prelude.Hashable
    DocumentClassifierInputDataConfig
  where
  hashWithSalt :: Int -> DocumentClassifierInputDataConfig -> Int
hashWithSalt
    Int
_salt
    DocumentClassifierInputDataConfig' {Maybe [AugmentedManifestsListItem]
Maybe Text
Maybe DocumentClassifierDataFormat
testS3Uri :: Maybe Text
s3Uri :: Maybe Text
labelDelimiter :: Maybe Text
dataFormat :: Maybe DocumentClassifierDataFormat
augmentedManifests :: Maybe [AugmentedManifestsListItem]
$sel:testS3Uri:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig -> Maybe Text
$sel:s3Uri:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig -> Maybe Text
$sel:labelDelimiter:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig -> Maybe Text
$sel:dataFormat:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig
-> Maybe DocumentClassifierDataFormat
$sel:augmentedManifests:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig
-> Maybe [AugmentedManifestsListItem]
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [AugmentedManifestsListItem]
augmentedManifests
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DocumentClassifierDataFormat
dataFormat
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
labelDelimiter
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3Uri
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
testS3Uri

instance
  Prelude.NFData
    DocumentClassifierInputDataConfig
  where
  rnf :: DocumentClassifierInputDataConfig -> ()
rnf DocumentClassifierInputDataConfig' {Maybe [AugmentedManifestsListItem]
Maybe Text
Maybe DocumentClassifierDataFormat
testS3Uri :: Maybe Text
s3Uri :: Maybe Text
labelDelimiter :: Maybe Text
dataFormat :: Maybe DocumentClassifierDataFormat
augmentedManifests :: Maybe [AugmentedManifestsListItem]
$sel:testS3Uri:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig -> Maybe Text
$sel:s3Uri:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig -> Maybe Text
$sel:labelDelimiter:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig -> Maybe Text
$sel:dataFormat:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig
-> Maybe DocumentClassifierDataFormat
$sel:augmentedManifests:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig
-> Maybe [AugmentedManifestsListItem]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [AugmentedManifestsListItem]
augmentedManifests
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DocumentClassifierDataFormat
dataFormat
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
labelDelimiter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3Uri
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
testS3Uri

instance
  Data.ToJSON
    DocumentClassifierInputDataConfig
  where
  toJSON :: DocumentClassifierInputDataConfig -> Value
toJSON DocumentClassifierInputDataConfig' {Maybe [AugmentedManifestsListItem]
Maybe Text
Maybe DocumentClassifierDataFormat
testS3Uri :: Maybe Text
s3Uri :: Maybe Text
labelDelimiter :: Maybe Text
dataFormat :: Maybe DocumentClassifierDataFormat
augmentedManifests :: Maybe [AugmentedManifestsListItem]
$sel:testS3Uri:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig -> Maybe Text
$sel:s3Uri:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig -> Maybe Text
$sel:labelDelimiter:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig -> Maybe Text
$sel:dataFormat:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig
-> Maybe DocumentClassifierDataFormat
$sel:augmentedManifests:DocumentClassifierInputDataConfig' :: DocumentClassifierInputDataConfig
-> Maybe [AugmentedManifestsListItem]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AugmentedManifests" 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 [AugmentedManifestsListItem]
augmentedManifests,
            (Key
"DataFormat" 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 DocumentClassifierDataFormat
dataFormat,
            (Key
"LabelDelimiter" 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
labelDelimiter,
            (Key
"S3Uri" 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
s3Uri,
            (Key
"TestS3Uri" 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
testS3Uri
          ]
      )