{-# 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 #-}
module Amazonka.Comprehend.Types.EntityRecognizerInputDataConfig where
import Amazonka.Comprehend.Types.AugmentedManifestsListItem
import Amazonka.Comprehend.Types.EntityRecognizerAnnotations
import Amazonka.Comprehend.Types.EntityRecognizerDataFormat
import Amazonka.Comprehend.Types.EntityRecognizerDocuments
import Amazonka.Comprehend.Types.EntityRecognizerEntityList
import Amazonka.Comprehend.Types.EntityTypesListItem
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EntityRecognizerInputDataConfig = EntityRecognizerInputDataConfig'
{
EntityRecognizerInputDataConfig
-> Maybe [AugmentedManifestsListItem]
augmentedManifests :: Prelude.Maybe [AugmentedManifestsListItem],
EntityRecognizerInputDataConfig
-> Maybe EntityRecognizerAnnotations
annotations :: Prelude.Maybe EntityRecognizerAnnotations,
EntityRecognizerInputDataConfig -> Maybe EntityRecognizerDataFormat
dataFormat :: Prelude.Maybe EntityRecognizerDataFormat,
EntityRecognizerInputDataConfig -> Maybe EntityRecognizerDocuments
documents :: Prelude.Maybe EntityRecognizerDocuments,
EntityRecognizerInputDataConfig -> Maybe EntityRecognizerEntityList
entityList :: Prelude.Maybe EntityRecognizerEntityList,
EntityRecognizerInputDataConfig -> [EntityTypesListItem]
entityTypes :: [EntityTypesListItem]
}
deriving (EntityRecognizerInputDataConfig
-> EntityRecognizerInputDataConfig -> Bool
(EntityRecognizerInputDataConfig
-> EntityRecognizerInputDataConfig -> Bool)
-> (EntityRecognizerInputDataConfig
-> EntityRecognizerInputDataConfig -> Bool)
-> Eq EntityRecognizerInputDataConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EntityRecognizerInputDataConfig
-> EntityRecognizerInputDataConfig -> Bool
$c/= :: EntityRecognizerInputDataConfig
-> EntityRecognizerInputDataConfig -> Bool
== :: EntityRecognizerInputDataConfig
-> EntityRecognizerInputDataConfig -> Bool
$c== :: EntityRecognizerInputDataConfig
-> EntityRecognizerInputDataConfig -> Bool
Prelude.Eq, ReadPrec [EntityRecognizerInputDataConfig]
ReadPrec EntityRecognizerInputDataConfig
Int -> ReadS EntityRecognizerInputDataConfig
ReadS [EntityRecognizerInputDataConfig]
(Int -> ReadS EntityRecognizerInputDataConfig)
-> ReadS [EntityRecognizerInputDataConfig]
-> ReadPrec EntityRecognizerInputDataConfig
-> ReadPrec [EntityRecognizerInputDataConfig]
-> Read EntityRecognizerInputDataConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EntityRecognizerInputDataConfig]
$creadListPrec :: ReadPrec [EntityRecognizerInputDataConfig]
readPrec :: ReadPrec EntityRecognizerInputDataConfig
$creadPrec :: ReadPrec EntityRecognizerInputDataConfig
readList :: ReadS [EntityRecognizerInputDataConfig]
$creadList :: ReadS [EntityRecognizerInputDataConfig]
readsPrec :: Int -> ReadS EntityRecognizerInputDataConfig
$creadsPrec :: Int -> ReadS EntityRecognizerInputDataConfig
Prelude.Read, Int -> EntityRecognizerInputDataConfig -> ShowS
[EntityRecognizerInputDataConfig] -> ShowS
EntityRecognizerInputDataConfig -> String
(Int -> EntityRecognizerInputDataConfig -> ShowS)
-> (EntityRecognizerInputDataConfig -> String)
-> ([EntityRecognizerInputDataConfig] -> ShowS)
-> Show EntityRecognizerInputDataConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EntityRecognizerInputDataConfig] -> ShowS
$cshowList :: [EntityRecognizerInputDataConfig] -> ShowS
show :: EntityRecognizerInputDataConfig -> String
$cshow :: EntityRecognizerInputDataConfig -> String
showsPrec :: Int -> EntityRecognizerInputDataConfig -> ShowS
$cshowsPrec :: Int -> EntityRecognizerInputDataConfig -> ShowS
Prelude.Show, (forall x.
EntityRecognizerInputDataConfig
-> Rep EntityRecognizerInputDataConfig x)
-> (forall x.
Rep EntityRecognizerInputDataConfig x
-> EntityRecognizerInputDataConfig)
-> Generic EntityRecognizerInputDataConfig
forall x.
Rep EntityRecognizerInputDataConfig x
-> EntityRecognizerInputDataConfig
forall x.
EntityRecognizerInputDataConfig
-> Rep EntityRecognizerInputDataConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EntityRecognizerInputDataConfig x
-> EntityRecognizerInputDataConfig
$cfrom :: forall x.
EntityRecognizerInputDataConfig
-> Rep EntityRecognizerInputDataConfig x
Prelude.Generic)
newEntityRecognizerInputDataConfig ::
EntityRecognizerInputDataConfig
newEntityRecognizerInputDataConfig :: EntityRecognizerInputDataConfig
newEntityRecognizerInputDataConfig =
EntityRecognizerInputDataConfig' :: Maybe [AugmentedManifestsListItem]
-> Maybe EntityRecognizerAnnotations
-> Maybe EntityRecognizerDataFormat
-> Maybe EntityRecognizerDocuments
-> Maybe EntityRecognizerEntityList
-> [EntityTypesListItem]
-> EntityRecognizerInputDataConfig
EntityRecognizerInputDataConfig'
{ $sel:augmentedManifests:EntityRecognizerInputDataConfig' :: Maybe [AugmentedManifestsListItem]
augmentedManifests =
Maybe [AugmentedManifestsListItem]
forall a. Maybe a
Prelude.Nothing,
$sel:annotations:EntityRecognizerInputDataConfig' :: Maybe EntityRecognizerAnnotations
annotations = Maybe EntityRecognizerAnnotations
forall a. Maybe a
Prelude.Nothing,
$sel:dataFormat:EntityRecognizerInputDataConfig' :: Maybe EntityRecognizerDataFormat
dataFormat = Maybe EntityRecognizerDataFormat
forall a. Maybe a
Prelude.Nothing,
$sel:documents:EntityRecognizerInputDataConfig' :: Maybe EntityRecognizerDocuments
documents = Maybe EntityRecognizerDocuments
forall a. Maybe a
Prelude.Nothing,
$sel:entityList:EntityRecognizerInputDataConfig' :: Maybe EntityRecognizerEntityList
entityList = Maybe EntityRecognizerEntityList
forall a. Maybe a
Prelude.Nothing,
$sel:entityTypes:EntityRecognizerInputDataConfig' :: [EntityTypesListItem]
entityTypes = [EntityTypesListItem]
forall a. Monoid a => a
Prelude.mempty
}
entityRecognizerInputDataConfig_augmentedManifests :: Lens.Lens' EntityRecognizerInputDataConfig (Prelude.Maybe [AugmentedManifestsListItem])
entityRecognizerInputDataConfig_augmentedManifests :: (Maybe [AugmentedManifestsListItem]
-> f (Maybe [AugmentedManifestsListItem]))
-> EntityRecognizerInputDataConfig
-> f EntityRecognizerInputDataConfig
entityRecognizerInputDataConfig_augmentedManifests = (EntityRecognizerInputDataConfig
-> Maybe [AugmentedManifestsListItem])
-> (EntityRecognizerInputDataConfig
-> Maybe [AugmentedManifestsListItem]
-> EntityRecognizerInputDataConfig)
-> Lens
EntityRecognizerInputDataConfig
EntityRecognizerInputDataConfig
(Maybe [AugmentedManifestsListItem])
(Maybe [AugmentedManifestsListItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntityRecognizerInputDataConfig' {Maybe [AugmentedManifestsListItem]
augmentedManifests :: Maybe [AugmentedManifestsListItem]
$sel:augmentedManifests:EntityRecognizerInputDataConfig' :: EntityRecognizerInputDataConfig
-> Maybe [AugmentedManifestsListItem]
augmentedManifests} -> Maybe [AugmentedManifestsListItem]
augmentedManifests) (\s :: EntityRecognizerInputDataConfig
s@EntityRecognizerInputDataConfig' {} Maybe [AugmentedManifestsListItem]
a -> EntityRecognizerInputDataConfig
s {$sel:augmentedManifests:EntityRecognizerInputDataConfig' :: Maybe [AugmentedManifestsListItem]
augmentedManifests = Maybe [AugmentedManifestsListItem]
a} :: EntityRecognizerInputDataConfig) ((Maybe [AugmentedManifestsListItem]
-> f (Maybe [AugmentedManifestsListItem]))
-> EntityRecognizerInputDataConfig
-> f EntityRecognizerInputDataConfig)
-> ((Maybe [AugmentedManifestsListItem]
-> f (Maybe [AugmentedManifestsListItem]))
-> Maybe [AugmentedManifestsListItem]
-> f (Maybe [AugmentedManifestsListItem]))
-> (Maybe [AugmentedManifestsListItem]
-> f (Maybe [AugmentedManifestsListItem]))
-> EntityRecognizerInputDataConfig
-> f EntityRecognizerInputDataConfig
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AugmentedManifestsListItem]
[AugmentedManifestsListItem]
[AugmentedManifestsListItem]
[AugmentedManifestsListItem]
-> Iso
(Maybe [AugmentedManifestsListItem])
(Maybe [AugmentedManifestsListItem])
(Maybe [AugmentedManifestsListItem])
(Maybe [AugmentedManifestsListItem])
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
[AugmentedManifestsListItem]
[AugmentedManifestsListItem]
[AugmentedManifestsListItem]
[AugmentedManifestsListItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
entityRecognizerInputDataConfig_annotations :: Lens.Lens' EntityRecognizerInputDataConfig (Prelude.Maybe EntityRecognizerAnnotations)
entityRecognizerInputDataConfig_annotations :: (Maybe EntityRecognizerAnnotations
-> f (Maybe EntityRecognizerAnnotations))
-> EntityRecognizerInputDataConfig
-> f EntityRecognizerInputDataConfig
entityRecognizerInputDataConfig_annotations = (EntityRecognizerInputDataConfig
-> Maybe EntityRecognizerAnnotations)
-> (EntityRecognizerInputDataConfig
-> Maybe EntityRecognizerAnnotations
-> EntityRecognizerInputDataConfig)
-> Lens
EntityRecognizerInputDataConfig
EntityRecognizerInputDataConfig
(Maybe EntityRecognizerAnnotations)
(Maybe EntityRecognizerAnnotations)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntityRecognizerInputDataConfig' {Maybe EntityRecognizerAnnotations
annotations :: Maybe EntityRecognizerAnnotations
$sel:annotations:EntityRecognizerInputDataConfig' :: EntityRecognizerInputDataConfig
-> Maybe EntityRecognizerAnnotations
annotations} -> Maybe EntityRecognizerAnnotations
annotations) (\s :: EntityRecognizerInputDataConfig
s@EntityRecognizerInputDataConfig' {} Maybe EntityRecognizerAnnotations
a -> EntityRecognizerInputDataConfig
s {$sel:annotations:EntityRecognizerInputDataConfig' :: Maybe EntityRecognizerAnnotations
annotations = Maybe EntityRecognizerAnnotations
a} :: EntityRecognizerInputDataConfig)
entityRecognizerInputDataConfig_dataFormat :: Lens.Lens' EntityRecognizerInputDataConfig (Prelude.Maybe EntityRecognizerDataFormat)
entityRecognizerInputDataConfig_dataFormat :: (Maybe EntityRecognizerDataFormat
-> f (Maybe EntityRecognizerDataFormat))
-> EntityRecognizerInputDataConfig
-> f EntityRecognizerInputDataConfig
entityRecognizerInputDataConfig_dataFormat = (EntityRecognizerInputDataConfig
-> Maybe EntityRecognizerDataFormat)
-> (EntityRecognizerInputDataConfig
-> Maybe EntityRecognizerDataFormat
-> EntityRecognizerInputDataConfig)
-> Lens
EntityRecognizerInputDataConfig
EntityRecognizerInputDataConfig
(Maybe EntityRecognizerDataFormat)
(Maybe EntityRecognizerDataFormat)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntityRecognizerInputDataConfig' {Maybe EntityRecognizerDataFormat
dataFormat :: Maybe EntityRecognizerDataFormat
$sel:dataFormat:EntityRecognizerInputDataConfig' :: EntityRecognizerInputDataConfig -> Maybe EntityRecognizerDataFormat
dataFormat} -> Maybe EntityRecognizerDataFormat
dataFormat) (\s :: EntityRecognizerInputDataConfig
s@EntityRecognizerInputDataConfig' {} Maybe EntityRecognizerDataFormat
a -> EntityRecognizerInputDataConfig
s {$sel:dataFormat:EntityRecognizerInputDataConfig' :: Maybe EntityRecognizerDataFormat
dataFormat = Maybe EntityRecognizerDataFormat
a} :: EntityRecognizerInputDataConfig)
entityRecognizerInputDataConfig_documents :: Lens.Lens' EntityRecognizerInputDataConfig (Prelude.Maybe EntityRecognizerDocuments)
entityRecognizerInputDataConfig_documents :: (Maybe EntityRecognizerDocuments
-> f (Maybe EntityRecognizerDocuments))
-> EntityRecognizerInputDataConfig
-> f EntityRecognizerInputDataConfig
entityRecognizerInputDataConfig_documents = (EntityRecognizerInputDataConfig
-> Maybe EntityRecognizerDocuments)
-> (EntityRecognizerInputDataConfig
-> Maybe EntityRecognizerDocuments
-> EntityRecognizerInputDataConfig)
-> Lens
EntityRecognizerInputDataConfig
EntityRecognizerInputDataConfig
(Maybe EntityRecognizerDocuments)
(Maybe EntityRecognizerDocuments)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntityRecognizerInputDataConfig' {Maybe EntityRecognizerDocuments
documents :: Maybe EntityRecognizerDocuments
$sel:documents:EntityRecognizerInputDataConfig' :: EntityRecognizerInputDataConfig -> Maybe EntityRecognizerDocuments
documents} -> Maybe EntityRecognizerDocuments
documents) (\s :: EntityRecognizerInputDataConfig
s@EntityRecognizerInputDataConfig' {} Maybe EntityRecognizerDocuments
a -> EntityRecognizerInputDataConfig
s {$sel:documents:EntityRecognizerInputDataConfig' :: Maybe EntityRecognizerDocuments
documents = Maybe EntityRecognizerDocuments
a} :: EntityRecognizerInputDataConfig)
entityRecognizerInputDataConfig_entityList :: Lens.Lens' EntityRecognizerInputDataConfig (Prelude.Maybe EntityRecognizerEntityList)
entityRecognizerInputDataConfig_entityList :: (Maybe EntityRecognizerEntityList
-> f (Maybe EntityRecognizerEntityList))
-> EntityRecognizerInputDataConfig
-> f EntityRecognizerInputDataConfig
entityRecognizerInputDataConfig_entityList = (EntityRecognizerInputDataConfig
-> Maybe EntityRecognizerEntityList)
-> (EntityRecognizerInputDataConfig
-> Maybe EntityRecognizerEntityList
-> EntityRecognizerInputDataConfig)
-> Lens
EntityRecognizerInputDataConfig
EntityRecognizerInputDataConfig
(Maybe EntityRecognizerEntityList)
(Maybe EntityRecognizerEntityList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntityRecognizerInputDataConfig' {Maybe EntityRecognizerEntityList
entityList :: Maybe EntityRecognizerEntityList
$sel:entityList:EntityRecognizerInputDataConfig' :: EntityRecognizerInputDataConfig -> Maybe EntityRecognizerEntityList
entityList} -> Maybe EntityRecognizerEntityList
entityList) (\s :: EntityRecognizerInputDataConfig
s@EntityRecognizerInputDataConfig' {} Maybe EntityRecognizerEntityList
a -> EntityRecognizerInputDataConfig
s {$sel:entityList:EntityRecognizerInputDataConfig' :: Maybe EntityRecognizerEntityList
entityList = Maybe EntityRecognizerEntityList
a} :: EntityRecognizerInputDataConfig)
entityRecognizerInputDataConfig_entityTypes :: Lens.Lens' EntityRecognizerInputDataConfig [EntityTypesListItem]
entityRecognizerInputDataConfig_entityTypes :: ([EntityTypesListItem] -> f [EntityTypesListItem])
-> EntityRecognizerInputDataConfig
-> f EntityRecognizerInputDataConfig
entityRecognizerInputDataConfig_entityTypes = (EntityRecognizerInputDataConfig -> [EntityTypesListItem])
-> (EntityRecognizerInputDataConfig
-> [EntityTypesListItem] -> EntityRecognizerInputDataConfig)
-> Lens
EntityRecognizerInputDataConfig
EntityRecognizerInputDataConfig
[EntityTypesListItem]
[EntityTypesListItem]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntityRecognizerInputDataConfig' {[EntityTypesListItem]
entityTypes :: [EntityTypesListItem]
$sel:entityTypes:EntityRecognizerInputDataConfig' :: EntityRecognizerInputDataConfig -> [EntityTypesListItem]
entityTypes} -> [EntityTypesListItem]
entityTypes) (\s :: EntityRecognizerInputDataConfig
s@EntityRecognizerInputDataConfig' {} [EntityTypesListItem]
a -> EntityRecognizerInputDataConfig
s {$sel:entityTypes:EntityRecognizerInputDataConfig' :: [EntityTypesListItem]
entityTypes = [EntityTypesListItem]
a} :: EntityRecognizerInputDataConfig) (([EntityTypesListItem] -> f [EntityTypesListItem])
-> EntityRecognizerInputDataConfig
-> f EntityRecognizerInputDataConfig)
-> (([EntityTypesListItem] -> f [EntityTypesListItem])
-> [EntityTypesListItem] -> f [EntityTypesListItem])
-> ([EntityTypesListItem] -> f [EntityTypesListItem])
-> EntityRecognizerInputDataConfig
-> f EntityRecognizerInputDataConfig
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EntityTypesListItem] -> f [EntityTypesListItem])
-> [EntityTypesListItem] -> f [EntityTypesListItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.FromJSON
EntityRecognizerInputDataConfig
where
parseJSON :: Value -> Parser EntityRecognizerInputDataConfig
parseJSON =
String
-> (Object -> Parser EntityRecognizerInputDataConfig)
-> Value
-> Parser EntityRecognizerInputDataConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EntityRecognizerInputDataConfig"
( \Object
x ->
Maybe [AugmentedManifestsListItem]
-> Maybe EntityRecognizerAnnotations
-> Maybe EntityRecognizerDataFormat
-> Maybe EntityRecognizerDocuments
-> Maybe EntityRecognizerEntityList
-> [EntityTypesListItem]
-> EntityRecognizerInputDataConfig
EntityRecognizerInputDataConfig'
(Maybe [AugmentedManifestsListItem]
-> Maybe EntityRecognizerAnnotations
-> Maybe EntityRecognizerDataFormat
-> Maybe EntityRecognizerDocuments
-> Maybe EntityRecognizerEntityList
-> [EntityTypesListItem]
-> EntityRecognizerInputDataConfig)
-> Parser (Maybe [AugmentedManifestsListItem])
-> Parser
(Maybe EntityRecognizerAnnotations
-> Maybe EntityRecognizerDataFormat
-> Maybe EntityRecognizerDocuments
-> Maybe EntityRecognizerEntityList
-> [EntityTypesListItem]
-> EntityRecognizerInputDataConfig)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Parser (Maybe (Maybe [AugmentedManifestsListItem]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AugmentedManifests"
Parser (Maybe (Maybe [AugmentedManifestsListItem]))
-> Maybe [AugmentedManifestsListItem]
-> Parser (Maybe [AugmentedManifestsListItem])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [AugmentedManifestsListItem]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe EntityRecognizerAnnotations
-> Maybe EntityRecognizerDataFormat
-> Maybe EntityRecognizerDocuments
-> Maybe EntityRecognizerEntityList
-> [EntityTypesListItem]
-> EntityRecognizerInputDataConfig)
-> Parser (Maybe EntityRecognizerAnnotations)
-> Parser
(Maybe EntityRecognizerDataFormat
-> Maybe EntityRecognizerDocuments
-> Maybe EntityRecognizerEntityList
-> [EntityTypesListItem]
-> EntityRecognizerInputDataConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EntityRecognizerAnnotations)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Annotations")
Parser
(Maybe EntityRecognizerDataFormat
-> Maybe EntityRecognizerDocuments
-> Maybe EntityRecognizerEntityList
-> [EntityTypesListItem]
-> EntityRecognizerInputDataConfig)
-> Parser (Maybe EntityRecognizerDataFormat)
-> Parser
(Maybe EntityRecognizerDocuments
-> Maybe EntityRecognizerEntityList
-> [EntityTypesListItem]
-> EntityRecognizerInputDataConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EntityRecognizerDataFormat)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DataFormat")
Parser
(Maybe EntityRecognizerDocuments
-> Maybe EntityRecognizerEntityList
-> [EntityTypesListItem]
-> EntityRecognizerInputDataConfig)
-> Parser (Maybe EntityRecognizerDocuments)
-> Parser
(Maybe EntityRecognizerEntityList
-> [EntityTypesListItem] -> EntityRecognizerInputDataConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EntityRecognizerDocuments)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Documents")
Parser
(Maybe EntityRecognizerEntityList
-> [EntityTypesListItem] -> EntityRecognizerInputDataConfig)
-> Parser (Maybe EntityRecognizerEntityList)
-> Parser
([EntityTypesListItem] -> EntityRecognizerInputDataConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EntityRecognizerEntityList)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EntityList")
Parser ([EntityTypesListItem] -> EntityRecognizerInputDataConfig)
-> Parser [EntityTypesListItem]
-> Parser EntityRecognizerInputDataConfig
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe [EntityTypesListItem])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EntityTypes" Parser (Maybe [EntityTypesListItem])
-> [EntityTypesListItem] -> Parser [EntityTypesListItem]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [EntityTypesListItem]
forall a. Monoid a => a
Prelude.mempty)
)
instance
Prelude.Hashable
EntityRecognizerInputDataConfig
instance
Prelude.NFData
EntityRecognizerInputDataConfig
instance Core.ToJSON EntityRecognizerInputDataConfig where
toJSON :: EntityRecognizerInputDataConfig -> Value
toJSON EntityRecognizerInputDataConfig' {[EntityTypesListItem]
Maybe [AugmentedManifestsListItem]
Maybe EntityRecognizerAnnotations
Maybe EntityRecognizerDataFormat
Maybe EntityRecognizerEntityList
Maybe EntityRecognizerDocuments
entityTypes :: [EntityTypesListItem]
entityList :: Maybe EntityRecognizerEntityList
documents :: Maybe EntityRecognizerDocuments
dataFormat :: Maybe EntityRecognizerDataFormat
annotations :: Maybe EntityRecognizerAnnotations
augmentedManifests :: Maybe [AugmentedManifestsListItem]
$sel:entityTypes:EntityRecognizerInputDataConfig' :: EntityRecognizerInputDataConfig -> [EntityTypesListItem]
$sel:entityList:EntityRecognizerInputDataConfig' :: EntityRecognizerInputDataConfig -> Maybe EntityRecognizerEntityList
$sel:documents:EntityRecognizerInputDataConfig' :: EntityRecognizerInputDataConfig -> Maybe EntityRecognizerDocuments
$sel:dataFormat:EntityRecognizerInputDataConfig' :: EntityRecognizerInputDataConfig -> Maybe EntityRecognizerDataFormat
$sel:annotations:EntityRecognizerInputDataConfig' :: EntityRecognizerInputDataConfig
-> Maybe EntityRecognizerAnnotations
$sel:augmentedManifests:EntityRecognizerInputDataConfig' :: EntityRecognizerInputDataConfig
-> Maybe [AugmentedManifestsListItem]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"AugmentedManifests" Text -> [AugmentedManifestsListItem] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([AugmentedManifestsListItem] -> Pair)
-> Maybe [AugmentedManifestsListItem] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AugmentedManifestsListItem]
augmentedManifests,
(Text
"Annotations" Text -> EntityRecognizerAnnotations -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EntityRecognizerAnnotations -> Pair)
-> Maybe EntityRecognizerAnnotations -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EntityRecognizerAnnotations
annotations,
(Text
"DataFormat" Text -> EntityRecognizerDataFormat -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EntityRecognizerDataFormat -> Pair)
-> Maybe EntityRecognizerDataFormat -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EntityRecognizerDataFormat
dataFormat,
(Text
"Documents" Text -> EntityRecognizerDocuments -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EntityRecognizerDocuments -> Pair)
-> Maybe EntityRecognizerDocuments -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EntityRecognizerDocuments
documents,
(Text
"EntityList" Text -> EntityRecognizerEntityList -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EntityRecognizerEntityList -> Pair)
-> Maybe EntityRecognizerEntityList -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EntityRecognizerEntityList
entityList,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"EntityTypes" Text -> [EntityTypesListItem] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [EntityTypesListItem]
entityTypes)
]
)