module Stratosphere.QBusiness.DataSource.InlineDocumentEnrichmentConfigurationProperty (
        module Exports, InlineDocumentEnrichmentConfigurationProperty(..),
        mkInlineDocumentEnrichmentConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QBusiness.DataSource.DocumentAttributeConditionProperty as Exports
import {-# SOURCE #-} Stratosphere.QBusiness.DataSource.DocumentAttributeTargetProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data InlineDocumentEnrichmentConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-inlinedocumentenrichmentconfiguration.html>
    InlineDocumentEnrichmentConfigurationProperty {InlineDocumentEnrichmentConfigurationProperty -> ()
haddock_workaround_ :: (),
                                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-inlinedocumentenrichmentconfiguration.html#cfn-qbusiness-datasource-inlinedocumentenrichmentconfiguration-condition>
                                                   InlineDocumentEnrichmentConfigurationProperty
-> Maybe DocumentAttributeConditionProperty
condition :: (Prelude.Maybe DocumentAttributeConditionProperty),
                                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-inlinedocumentenrichmentconfiguration.html#cfn-qbusiness-datasource-inlinedocumentenrichmentconfiguration-documentcontentoperator>
                                                   InlineDocumentEnrichmentConfigurationProperty -> Maybe (Value Text)
documentContentOperator :: (Prelude.Maybe (Value Prelude.Text)),
                                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-datasource-inlinedocumentenrichmentconfiguration.html#cfn-qbusiness-datasource-inlinedocumentenrichmentconfiguration-target>
                                                   InlineDocumentEnrichmentConfigurationProperty
-> Maybe DocumentAttributeTargetProperty
target :: (Prelude.Maybe DocumentAttributeTargetProperty)}
  deriving stock (InlineDocumentEnrichmentConfigurationProperty
-> InlineDocumentEnrichmentConfigurationProperty -> Bool
(InlineDocumentEnrichmentConfigurationProperty
 -> InlineDocumentEnrichmentConfigurationProperty -> Bool)
-> (InlineDocumentEnrichmentConfigurationProperty
    -> InlineDocumentEnrichmentConfigurationProperty -> Bool)
-> Eq InlineDocumentEnrichmentConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: InlineDocumentEnrichmentConfigurationProperty
-> InlineDocumentEnrichmentConfigurationProperty -> Bool
== :: InlineDocumentEnrichmentConfigurationProperty
-> InlineDocumentEnrichmentConfigurationProperty -> Bool
$c/= :: InlineDocumentEnrichmentConfigurationProperty
-> InlineDocumentEnrichmentConfigurationProperty -> Bool
/= :: InlineDocumentEnrichmentConfigurationProperty
-> InlineDocumentEnrichmentConfigurationProperty -> Bool
Prelude.Eq, Int -> InlineDocumentEnrichmentConfigurationProperty -> ShowS
[InlineDocumentEnrichmentConfigurationProperty] -> ShowS
InlineDocumentEnrichmentConfigurationProperty -> String
(Int -> InlineDocumentEnrichmentConfigurationProperty -> ShowS)
-> (InlineDocumentEnrichmentConfigurationProperty -> String)
-> ([InlineDocumentEnrichmentConfigurationProperty] -> ShowS)
-> Show InlineDocumentEnrichmentConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InlineDocumentEnrichmentConfigurationProperty -> ShowS
showsPrec :: Int -> InlineDocumentEnrichmentConfigurationProperty -> ShowS
$cshow :: InlineDocumentEnrichmentConfigurationProperty -> String
show :: InlineDocumentEnrichmentConfigurationProperty -> String
$cshowList :: [InlineDocumentEnrichmentConfigurationProperty] -> ShowS
showList :: [InlineDocumentEnrichmentConfigurationProperty] -> ShowS
Prelude.Show)
mkInlineDocumentEnrichmentConfigurationProperty ::
  InlineDocumentEnrichmentConfigurationProperty
mkInlineDocumentEnrichmentConfigurationProperty :: InlineDocumentEnrichmentConfigurationProperty
mkInlineDocumentEnrichmentConfigurationProperty
  = InlineDocumentEnrichmentConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), condition :: Maybe DocumentAttributeConditionProperty
condition = Maybe DocumentAttributeConditionProperty
forall a. Maybe a
Prelude.Nothing,
       documentContentOperator :: Maybe (Value Text)
documentContentOperator = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       target :: Maybe DocumentAttributeTargetProperty
target = Maybe DocumentAttributeTargetProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties InlineDocumentEnrichmentConfigurationProperty where
  toResourceProperties :: InlineDocumentEnrichmentConfigurationProperty -> ResourceProperties
toResourceProperties
    InlineDocumentEnrichmentConfigurationProperty {Maybe (Value Text)
Maybe DocumentAttributeTargetProperty
Maybe DocumentAttributeConditionProperty
()
haddock_workaround_ :: InlineDocumentEnrichmentConfigurationProperty -> ()
condition :: InlineDocumentEnrichmentConfigurationProperty
-> Maybe DocumentAttributeConditionProperty
documentContentOperator :: InlineDocumentEnrichmentConfigurationProperty -> Maybe (Value Text)
target :: InlineDocumentEnrichmentConfigurationProperty
-> Maybe DocumentAttributeTargetProperty
haddock_workaround_ :: ()
condition :: Maybe DocumentAttributeConditionProperty
documentContentOperator :: Maybe (Value Text)
target :: Maybe DocumentAttributeTargetProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QBusiness::DataSource.InlineDocumentEnrichmentConfiguration",
         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 -> DocumentAttributeConditionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Condition" (DocumentAttributeConditionProperty -> (Key, Value))
-> Maybe DocumentAttributeConditionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentAttributeConditionProperty
condition,
                            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..=) Key
"DocumentContentOperator"
                              (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
documentContentOperator,
                            Key -> DocumentAttributeTargetProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Target" (DocumentAttributeTargetProperty -> (Key, Value))
-> Maybe DocumentAttributeTargetProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentAttributeTargetProperty
target])}
instance JSON.ToJSON InlineDocumentEnrichmentConfigurationProperty where
  toJSON :: InlineDocumentEnrichmentConfigurationProperty -> Value
toJSON InlineDocumentEnrichmentConfigurationProperty {Maybe (Value Text)
Maybe DocumentAttributeTargetProperty
Maybe DocumentAttributeConditionProperty
()
haddock_workaround_ :: InlineDocumentEnrichmentConfigurationProperty -> ()
condition :: InlineDocumentEnrichmentConfigurationProperty
-> Maybe DocumentAttributeConditionProperty
documentContentOperator :: InlineDocumentEnrichmentConfigurationProperty -> Maybe (Value Text)
target :: InlineDocumentEnrichmentConfigurationProperty
-> Maybe DocumentAttributeTargetProperty
haddock_workaround_ :: ()
condition :: Maybe DocumentAttributeConditionProperty
documentContentOperator :: Maybe (Value Text)
target :: Maybe DocumentAttributeTargetProperty
..}
    = [(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 -> DocumentAttributeConditionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Condition" (DocumentAttributeConditionProperty -> (Key, Value))
-> Maybe DocumentAttributeConditionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentAttributeConditionProperty
condition,
               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..=) Key
"DocumentContentOperator"
                 (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
documentContentOperator,
               Key -> DocumentAttributeTargetProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Target" (DocumentAttributeTargetProperty -> (Key, Value))
-> Maybe DocumentAttributeTargetProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentAttributeTargetProperty
target]))
instance Property "Condition" InlineDocumentEnrichmentConfigurationProperty where
  type PropertyType "Condition" InlineDocumentEnrichmentConfigurationProperty = DocumentAttributeConditionProperty
  set :: PropertyType
  "Condition" InlineDocumentEnrichmentConfigurationProperty
-> InlineDocumentEnrichmentConfigurationProperty
-> InlineDocumentEnrichmentConfigurationProperty
set PropertyType
  "Condition" InlineDocumentEnrichmentConfigurationProperty
newValue InlineDocumentEnrichmentConfigurationProperty {Maybe (Value Text)
Maybe DocumentAttributeTargetProperty
Maybe DocumentAttributeConditionProperty
()
haddock_workaround_ :: InlineDocumentEnrichmentConfigurationProperty -> ()
condition :: InlineDocumentEnrichmentConfigurationProperty
-> Maybe DocumentAttributeConditionProperty
documentContentOperator :: InlineDocumentEnrichmentConfigurationProperty -> Maybe (Value Text)
target :: InlineDocumentEnrichmentConfigurationProperty
-> Maybe DocumentAttributeTargetProperty
haddock_workaround_ :: ()
condition :: Maybe DocumentAttributeConditionProperty
documentContentOperator :: Maybe (Value Text)
target :: Maybe DocumentAttributeTargetProperty
..}
    = InlineDocumentEnrichmentConfigurationProperty
        {condition :: Maybe DocumentAttributeConditionProperty
condition = DocumentAttributeConditionProperty
-> Maybe DocumentAttributeConditionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "Condition" InlineDocumentEnrichmentConfigurationProperty
DocumentAttributeConditionProperty
newValue, Maybe (Value Text)
Maybe DocumentAttributeTargetProperty
()
haddock_workaround_ :: ()
documentContentOperator :: Maybe (Value Text)
target :: Maybe DocumentAttributeTargetProperty
haddock_workaround_ :: ()
documentContentOperator :: Maybe (Value Text)
target :: Maybe DocumentAttributeTargetProperty
..}
instance Property "DocumentContentOperator" InlineDocumentEnrichmentConfigurationProperty where
  type PropertyType "DocumentContentOperator" InlineDocumentEnrichmentConfigurationProperty = Value Prelude.Text
  set :: PropertyType
  "DocumentContentOperator"
  InlineDocumentEnrichmentConfigurationProperty
-> InlineDocumentEnrichmentConfigurationProperty
-> InlineDocumentEnrichmentConfigurationProperty
set PropertyType
  "DocumentContentOperator"
  InlineDocumentEnrichmentConfigurationProperty
newValue InlineDocumentEnrichmentConfigurationProperty {Maybe (Value Text)
Maybe DocumentAttributeTargetProperty
Maybe DocumentAttributeConditionProperty
()
haddock_workaround_ :: InlineDocumentEnrichmentConfigurationProperty -> ()
condition :: InlineDocumentEnrichmentConfigurationProperty
-> Maybe DocumentAttributeConditionProperty
documentContentOperator :: InlineDocumentEnrichmentConfigurationProperty -> Maybe (Value Text)
target :: InlineDocumentEnrichmentConfigurationProperty
-> Maybe DocumentAttributeTargetProperty
haddock_workaround_ :: ()
condition :: Maybe DocumentAttributeConditionProperty
documentContentOperator :: Maybe (Value Text)
target :: Maybe DocumentAttributeTargetProperty
..}
    = InlineDocumentEnrichmentConfigurationProperty
        {documentContentOperator :: Maybe (Value Text)
documentContentOperator = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "DocumentContentOperator"
  InlineDocumentEnrichmentConfigurationProperty
Value Text
newValue, Maybe DocumentAttributeTargetProperty
Maybe DocumentAttributeConditionProperty
()
haddock_workaround_ :: ()
condition :: Maybe DocumentAttributeConditionProperty
target :: Maybe DocumentAttributeTargetProperty
haddock_workaround_ :: ()
condition :: Maybe DocumentAttributeConditionProperty
target :: Maybe DocumentAttributeTargetProperty
..}
instance Property "Target" InlineDocumentEnrichmentConfigurationProperty where
  type PropertyType "Target" InlineDocumentEnrichmentConfigurationProperty = DocumentAttributeTargetProperty
  set :: PropertyType "Target" InlineDocumentEnrichmentConfigurationProperty
-> InlineDocumentEnrichmentConfigurationProperty
-> InlineDocumentEnrichmentConfigurationProperty
set PropertyType "Target" InlineDocumentEnrichmentConfigurationProperty
newValue InlineDocumentEnrichmentConfigurationProperty {Maybe (Value Text)
Maybe DocumentAttributeTargetProperty
Maybe DocumentAttributeConditionProperty
()
haddock_workaround_ :: InlineDocumentEnrichmentConfigurationProperty -> ()
condition :: InlineDocumentEnrichmentConfigurationProperty
-> Maybe DocumentAttributeConditionProperty
documentContentOperator :: InlineDocumentEnrichmentConfigurationProperty -> Maybe (Value Text)
target :: InlineDocumentEnrichmentConfigurationProperty
-> Maybe DocumentAttributeTargetProperty
haddock_workaround_ :: ()
condition :: Maybe DocumentAttributeConditionProperty
documentContentOperator :: Maybe (Value Text)
target :: Maybe DocumentAttributeTargetProperty
..}
    = InlineDocumentEnrichmentConfigurationProperty
        {target :: Maybe DocumentAttributeTargetProperty
target = DocumentAttributeTargetProperty
-> Maybe DocumentAttributeTargetProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Target" InlineDocumentEnrichmentConfigurationProperty
DocumentAttributeTargetProperty
newValue, Maybe (Value Text)
Maybe DocumentAttributeConditionProperty
()
haddock_workaround_ :: ()
condition :: Maybe DocumentAttributeConditionProperty
documentContentOperator :: Maybe (Value Text)
haddock_workaround_ :: ()
condition :: Maybe DocumentAttributeConditionProperty
documentContentOperator :: Maybe (Value Text)
..}