module Stratosphere.Comprehend.Flywheel.TaskConfigProperty (
module Exports, TaskConfigProperty(..), mkTaskConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Comprehend.Flywheel.DocumentClassificationConfigProperty as Exports
import {-# SOURCE #-} Stratosphere.Comprehend.Flywheel.EntityRecognitionConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TaskConfigProperty
=
TaskConfigProperty {TaskConfigProperty -> ()
haddock_workaround_ :: (),
TaskConfigProperty -> Maybe DocumentClassificationConfigProperty
documentClassificationConfig :: (Prelude.Maybe DocumentClassificationConfigProperty),
TaskConfigProperty -> Maybe EntityRecognitionConfigProperty
entityRecognitionConfig :: (Prelude.Maybe EntityRecognitionConfigProperty),
TaskConfigProperty -> Value Text
languageCode :: (Value Prelude.Text)}
deriving stock (TaskConfigProperty -> TaskConfigProperty -> Bool
(TaskConfigProperty -> TaskConfigProperty -> Bool)
-> (TaskConfigProperty -> TaskConfigProperty -> Bool)
-> Eq TaskConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TaskConfigProperty -> TaskConfigProperty -> Bool
== :: TaskConfigProperty -> TaskConfigProperty -> Bool
$c/= :: TaskConfigProperty -> TaskConfigProperty -> Bool
/= :: TaskConfigProperty -> TaskConfigProperty -> Bool
Prelude.Eq, Int -> TaskConfigProperty -> ShowS
[TaskConfigProperty] -> ShowS
TaskConfigProperty -> String
(Int -> TaskConfigProperty -> ShowS)
-> (TaskConfigProperty -> String)
-> ([TaskConfigProperty] -> ShowS)
-> Show TaskConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TaskConfigProperty -> ShowS
showsPrec :: Int -> TaskConfigProperty -> ShowS
$cshow :: TaskConfigProperty -> String
show :: TaskConfigProperty -> String
$cshowList :: [TaskConfigProperty] -> ShowS
showList :: [TaskConfigProperty] -> ShowS
Prelude.Show)
mkTaskConfigProperty :: Value Prelude.Text -> TaskConfigProperty
mkTaskConfigProperty :: Value Text -> TaskConfigProperty
mkTaskConfigProperty Value Text
languageCode
= TaskConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), languageCode :: Value Text
languageCode = Value Text
languageCode,
documentClassificationConfig :: Maybe DocumentClassificationConfigProperty
documentClassificationConfig = Maybe DocumentClassificationConfigProperty
forall a. Maybe a
Prelude.Nothing,
entityRecognitionConfig :: Maybe EntityRecognitionConfigProperty
entityRecognitionConfig = Maybe EntityRecognitionConfigProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TaskConfigProperty where
toResourceProperties :: TaskConfigProperty -> ResourceProperties
toResourceProperties TaskConfigProperty {Maybe DocumentClassificationConfigProperty
Maybe EntityRecognitionConfigProperty
()
Value Text
haddock_workaround_ :: TaskConfigProperty -> ()
documentClassificationConfig :: TaskConfigProperty -> Maybe DocumentClassificationConfigProperty
entityRecognitionConfig :: TaskConfigProperty -> Maybe EntityRecognitionConfigProperty
languageCode :: TaskConfigProperty -> Value Text
haddock_workaround_ :: ()
documentClassificationConfig :: Maybe DocumentClassificationConfigProperty
entityRecognitionConfig :: Maybe EntityRecognitionConfigProperty
languageCode :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Comprehend::Flywheel.TaskConfig",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"LanguageCode" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
languageCode]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> DocumentClassificationConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DocumentClassificationConfig"
(DocumentClassificationConfigProperty -> (Key, Value))
-> Maybe DocumentClassificationConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentClassificationConfigProperty
documentClassificationConfig,
Key -> EntityRecognitionConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EntityRecognitionConfig"
(EntityRecognitionConfigProperty -> (Key, Value))
-> Maybe EntityRecognitionConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EntityRecognitionConfigProperty
entityRecognitionConfig]))}
instance JSON.ToJSON TaskConfigProperty where
toJSON :: TaskConfigProperty -> Value
toJSON TaskConfigProperty {Maybe DocumentClassificationConfigProperty
Maybe EntityRecognitionConfigProperty
()
Value Text
haddock_workaround_ :: TaskConfigProperty -> ()
documentClassificationConfig :: TaskConfigProperty -> Maybe DocumentClassificationConfigProperty
entityRecognitionConfig :: TaskConfigProperty -> Maybe EntityRecognitionConfigProperty
languageCode :: TaskConfigProperty -> Value Text
haddock_workaround_ :: ()
documentClassificationConfig :: Maybe DocumentClassificationConfigProperty
entityRecognitionConfig :: Maybe EntityRecognitionConfigProperty
languageCode :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"LanguageCode" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
languageCode]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> DocumentClassificationConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DocumentClassificationConfig"
(DocumentClassificationConfigProperty -> (Key, Value))
-> Maybe DocumentClassificationConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentClassificationConfigProperty
documentClassificationConfig,
Key -> EntityRecognitionConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EntityRecognitionConfig"
(EntityRecognitionConfigProperty -> (Key, Value))
-> Maybe EntityRecognitionConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EntityRecognitionConfigProperty
entityRecognitionConfig])))
instance Property "DocumentClassificationConfig" TaskConfigProperty where
type PropertyType "DocumentClassificationConfig" TaskConfigProperty = DocumentClassificationConfigProperty
set :: PropertyType "DocumentClassificationConfig" TaskConfigProperty
-> TaskConfigProperty -> TaskConfigProperty
set PropertyType "DocumentClassificationConfig" TaskConfigProperty
newValue TaskConfigProperty {Maybe DocumentClassificationConfigProperty
Maybe EntityRecognitionConfigProperty
()
Value Text
haddock_workaround_ :: TaskConfigProperty -> ()
documentClassificationConfig :: TaskConfigProperty -> Maybe DocumentClassificationConfigProperty
entityRecognitionConfig :: TaskConfigProperty -> Maybe EntityRecognitionConfigProperty
languageCode :: TaskConfigProperty -> Value Text
haddock_workaround_ :: ()
documentClassificationConfig :: Maybe DocumentClassificationConfigProperty
entityRecognitionConfig :: Maybe EntityRecognitionConfigProperty
languageCode :: Value Text
..}
= TaskConfigProperty
{documentClassificationConfig :: Maybe DocumentClassificationConfigProperty
documentClassificationConfig = DocumentClassificationConfigProperty
-> Maybe DocumentClassificationConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DocumentClassificationConfig" TaskConfigProperty
DocumentClassificationConfigProperty
newValue, Maybe EntityRecognitionConfigProperty
()
Value Text
haddock_workaround_ :: ()
entityRecognitionConfig :: Maybe EntityRecognitionConfigProperty
languageCode :: Value Text
haddock_workaround_ :: ()
entityRecognitionConfig :: Maybe EntityRecognitionConfigProperty
languageCode :: Value Text
..}
instance Property "EntityRecognitionConfig" TaskConfigProperty where
type PropertyType "EntityRecognitionConfig" TaskConfigProperty = EntityRecognitionConfigProperty
set :: PropertyType "EntityRecognitionConfig" TaskConfigProperty
-> TaskConfigProperty -> TaskConfigProperty
set PropertyType "EntityRecognitionConfig" TaskConfigProperty
newValue TaskConfigProperty {Maybe DocumentClassificationConfigProperty
Maybe EntityRecognitionConfigProperty
()
Value Text
haddock_workaround_ :: TaskConfigProperty -> ()
documentClassificationConfig :: TaskConfigProperty -> Maybe DocumentClassificationConfigProperty
entityRecognitionConfig :: TaskConfigProperty -> Maybe EntityRecognitionConfigProperty
languageCode :: TaskConfigProperty -> Value Text
haddock_workaround_ :: ()
documentClassificationConfig :: Maybe DocumentClassificationConfigProperty
entityRecognitionConfig :: Maybe EntityRecognitionConfigProperty
languageCode :: Value Text
..}
= TaskConfigProperty
{entityRecognitionConfig :: Maybe EntityRecognitionConfigProperty
entityRecognitionConfig = EntityRecognitionConfigProperty
-> Maybe EntityRecognitionConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EntityRecognitionConfig" TaskConfigProperty
EntityRecognitionConfigProperty
newValue, Maybe DocumentClassificationConfigProperty
()
Value Text
haddock_workaround_ :: ()
documentClassificationConfig :: Maybe DocumentClassificationConfigProperty
languageCode :: Value Text
haddock_workaround_ :: ()
documentClassificationConfig :: Maybe DocumentClassificationConfigProperty
languageCode :: Value Text
..}
instance Property "LanguageCode" TaskConfigProperty where
type PropertyType "LanguageCode" TaskConfigProperty = Value Prelude.Text
set :: PropertyType "LanguageCode" TaskConfigProperty
-> TaskConfigProperty -> TaskConfigProperty
set PropertyType "LanguageCode" TaskConfigProperty
newValue TaskConfigProperty {Maybe DocumentClassificationConfigProperty
Maybe EntityRecognitionConfigProperty
()
Value Text
haddock_workaround_ :: TaskConfigProperty -> ()
documentClassificationConfig :: TaskConfigProperty -> Maybe DocumentClassificationConfigProperty
entityRecognitionConfig :: TaskConfigProperty -> Maybe EntityRecognitionConfigProperty
languageCode :: TaskConfigProperty -> Value Text
haddock_workaround_ :: ()
documentClassificationConfig :: Maybe DocumentClassificationConfigProperty
entityRecognitionConfig :: Maybe EntityRecognitionConfigProperty
languageCode :: Value Text
..}
= TaskConfigProperty {languageCode :: Value Text
languageCode = PropertyType "LanguageCode" TaskConfigProperty
Value Text
newValue, Maybe DocumentClassificationConfigProperty
Maybe EntityRecognitionConfigProperty
()
haddock_workaround_ :: ()
documentClassificationConfig :: Maybe DocumentClassificationConfigProperty
entityRecognitionConfig :: Maybe EntityRecognitionConfigProperty
haddock_workaround_ :: ()
documentClassificationConfig :: Maybe DocumentClassificationConfigProperty
entityRecognitionConfig :: Maybe EntityRecognitionConfigProperty
..}