module Stratosphere.Comprehend.Flywheel.EntityRecognitionConfigProperty (
        module Exports, EntityRecognitionConfigProperty(..),
        mkEntityRecognitionConfigProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Comprehend.Flywheel.EntityTypesListItemProperty as Exports
import Stratosphere.ResourceProperties
data EntityRecognitionConfigProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-comprehend-flywheel-entityrecognitionconfig.html>
    EntityRecognitionConfigProperty {EntityRecognitionConfigProperty -> ()
haddock_workaround_ :: (),
                                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-comprehend-flywheel-entityrecognitionconfig.html#cfn-comprehend-flywheel-entityrecognitionconfig-entitytypes>
                                     EntityRecognitionConfigProperty
-> Maybe [EntityTypesListItemProperty]
entityTypes :: (Prelude.Maybe [EntityTypesListItemProperty])}
  deriving stock (EntityRecognitionConfigProperty
-> EntityRecognitionConfigProperty -> Bool
(EntityRecognitionConfigProperty
 -> EntityRecognitionConfigProperty -> Bool)
-> (EntityRecognitionConfigProperty
    -> EntityRecognitionConfigProperty -> Bool)
-> Eq EntityRecognitionConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EntityRecognitionConfigProperty
-> EntityRecognitionConfigProperty -> Bool
== :: EntityRecognitionConfigProperty
-> EntityRecognitionConfigProperty -> Bool
$c/= :: EntityRecognitionConfigProperty
-> EntityRecognitionConfigProperty -> Bool
/= :: EntityRecognitionConfigProperty
-> EntityRecognitionConfigProperty -> Bool
Prelude.Eq, Int -> EntityRecognitionConfigProperty -> ShowS
[EntityRecognitionConfigProperty] -> ShowS
EntityRecognitionConfigProperty -> String
(Int -> EntityRecognitionConfigProperty -> ShowS)
-> (EntityRecognitionConfigProperty -> String)
-> ([EntityRecognitionConfigProperty] -> ShowS)
-> Show EntityRecognitionConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EntityRecognitionConfigProperty -> ShowS
showsPrec :: Int -> EntityRecognitionConfigProperty -> ShowS
$cshow :: EntityRecognitionConfigProperty -> String
show :: EntityRecognitionConfigProperty -> String
$cshowList :: [EntityRecognitionConfigProperty] -> ShowS
showList :: [EntityRecognitionConfigProperty] -> ShowS
Prelude.Show)
mkEntityRecognitionConfigProperty ::
  EntityRecognitionConfigProperty
mkEntityRecognitionConfigProperty :: EntityRecognitionConfigProperty
mkEntityRecognitionConfigProperty
  = EntityRecognitionConfigProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), entityTypes :: Maybe [EntityTypesListItemProperty]
entityTypes = Maybe [EntityTypesListItemProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EntityRecognitionConfigProperty where
  toResourceProperties :: EntityRecognitionConfigProperty -> ResourceProperties
toResourceProperties EntityRecognitionConfigProperty {Maybe [EntityTypesListItemProperty]
()
haddock_workaround_ :: EntityRecognitionConfigProperty -> ()
entityTypes :: EntityRecognitionConfigProperty
-> Maybe [EntityTypesListItemProperty]
haddock_workaround_ :: ()
entityTypes :: Maybe [EntityTypesListItemProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Comprehend::Flywheel.EntityRecognitionConfig",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> [EntityTypesListItemProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EntityTypes" ([EntityTypesListItemProperty] -> (Key, Value))
-> Maybe [EntityTypesListItemProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EntityTypesListItemProperty]
entityTypes])}
instance JSON.ToJSON EntityRecognitionConfigProperty where
  toJSON :: EntityRecognitionConfigProperty -> Value
toJSON EntityRecognitionConfigProperty {Maybe [EntityTypesListItemProperty]
()
haddock_workaround_ :: EntityRecognitionConfigProperty -> ()
entityTypes :: EntityRecognitionConfigProperty
-> Maybe [EntityTypesListItemProperty]
haddock_workaround_ :: ()
entityTypes :: Maybe [EntityTypesListItemProperty]
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> [EntityTypesListItemProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EntityTypes" ([EntityTypesListItemProperty] -> (Key, Value))
-> Maybe [EntityTypesListItemProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EntityTypesListItemProperty]
entityTypes]))
instance Property "EntityTypes" EntityRecognitionConfigProperty where
  type PropertyType "EntityTypes" EntityRecognitionConfigProperty = [EntityTypesListItemProperty]
  set :: PropertyType "EntityTypes" EntityRecognitionConfigProperty
-> EntityRecognitionConfigProperty
-> EntityRecognitionConfigProperty
set PropertyType "EntityTypes" EntityRecognitionConfigProperty
newValue EntityRecognitionConfigProperty {Maybe [EntityTypesListItemProperty]
()
haddock_workaround_ :: EntityRecognitionConfigProperty -> ()
entityTypes :: EntityRecognitionConfigProperty
-> Maybe [EntityTypesListItemProperty]
haddock_workaround_ :: ()
entityTypes :: Maybe [EntityTypesListItemProperty]
..}
    = EntityRecognitionConfigProperty
        {entityTypes :: Maybe [EntityTypesListItemProperty]
entityTypes = [EntityTypesListItemProperty]
-> Maybe [EntityTypesListItemProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [EntityTypesListItemProperty]
PropertyType "EntityTypes" EntityRecognitionConfigProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}