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