module Stratosphere.Kendra.DataSource.HookConfigurationProperty (
        module Exports, HookConfigurationProperty(..),
        mkHookConfigurationProperty
    ) 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 Stratosphere.ResourceProperties
import Stratosphere.Value
data HookConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-hookconfiguration.html>
    HookConfigurationProperty {HookConfigurationProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-hookconfiguration.html#cfn-kendra-datasource-hookconfiguration-invocationcondition>
                               HookConfigurationProperty
-> Maybe DocumentAttributeConditionProperty
invocationCondition :: (Prelude.Maybe DocumentAttributeConditionProperty),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-hookconfiguration.html#cfn-kendra-datasource-hookconfiguration-lambdaarn>
                               HookConfigurationProperty -> Value Text
lambdaArn :: (Value Prelude.Text),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-hookconfiguration.html#cfn-kendra-datasource-hookconfiguration-s3bucket>
                               HookConfigurationProperty -> Value Text
s3Bucket :: (Value Prelude.Text)}
  deriving stock (HookConfigurationProperty -> HookConfigurationProperty -> Bool
(HookConfigurationProperty -> HookConfigurationProperty -> Bool)
-> (HookConfigurationProperty -> HookConfigurationProperty -> Bool)
-> Eq HookConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HookConfigurationProperty -> HookConfigurationProperty -> Bool
== :: HookConfigurationProperty -> HookConfigurationProperty -> Bool
$c/= :: HookConfigurationProperty -> HookConfigurationProperty -> Bool
/= :: HookConfigurationProperty -> HookConfigurationProperty -> Bool
Prelude.Eq, Int -> HookConfigurationProperty -> ShowS
[HookConfigurationProperty] -> ShowS
HookConfigurationProperty -> String
(Int -> HookConfigurationProperty -> ShowS)
-> (HookConfigurationProperty -> String)
-> ([HookConfigurationProperty] -> ShowS)
-> Show HookConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> HookConfigurationProperty -> ShowS
showsPrec :: Int -> HookConfigurationProperty -> ShowS
$cshow :: HookConfigurationProperty -> String
show :: HookConfigurationProperty -> String
$cshowList :: [HookConfigurationProperty] -> ShowS
showList :: [HookConfigurationProperty] -> ShowS
Prelude.Show)
mkHookConfigurationProperty ::
  Value Prelude.Text
  -> Value Prelude.Text -> HookConfigurationProperty
mkHookConfigurationProperty :: Value Text -> Value Text -> HookConfigurationProperty
mkHookConfigurationProperty Value Text
lambdaArn Value Text
s3Bucket
  = HookConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), lambdaArn :: Value Text
lambdaArn = Value Text
lambdaArn,
       s3Bucket :: Value Text
s3Bucket = Value Text
s3Bucket, invocationCondition :: Maybe DocumentAttributeConditionProperty
invocationCondition = Maybe DocumentAttributeConditionProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties HookConfigurationProperty where
  toResourceProperties :: HookConfigurationProperty -> ResourceProperties
toResourceProperties HookConfigurationProperty {Maybe DocumentAttributeConditionProperty
()
Value Text
haddock_workaround_ :: HookConfigurationProperty -> ()
invocationCondition :: HookConfigurationProperty
-> Maybe DocumentAttributeConditionProperty
lambdaArn :: HookConfigurationProperty -> Value Text
s3Bucket :: HookConfigurationProperty -> Value Text
haddock_workaround_ :: ()
invocationCondition :: Maybe DocumentAttributeConditionProperty
lambdaArn :: Value Text
s3Bucket :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Kendra::DataSource.HookConfiguration",
         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
"LambdaArn" 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
lambdaArn, Key
"S3Bucket" 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
s3Bucket]
                           ([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
"InvocationCondition"
                                 (DocumentAttributeConditionProperty -> (Key, Value))
-> Maybe DocumentAttributeConditionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentAttributeConditionProperty
invocationCondition]))}
instance JSON.ToJSON HookConfigurationProperty where
  toJSON :: HookConfigurationProperty -> Value
toJSON HookConfigurationProperty {Maybe DocumentAttributeConditionProperty
()
Value Text
haddock_workaround_ :: HookConfigurationProperty -> ()
invocationCondition :: HookConfigurationProperty
-> Maybe DocumentAttributeConditionProperty
lambdaArn :: HookConfigurationProperty -> Value Text
s3Bucket :: HookConfigurationProperty -> Value Text
haddock_workaround_ :: ()
invocationCondition :: Maybe DocumentAttributeConditionProperty
lambdaArn :: Value Text
s3Bucket :: 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
"LambdaArn" 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
lambdaArn, Key
"S3Bucket" 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
s3Bucket]
              ([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
"InvocationCondition"
                    (DocumentAttributeConditionProperty -> (Key, Value))
-> Maybe DocumentAttributeConditionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentAttributeConditionProperty
invocationCondition])))
instance Property "InvocationCondition" HookConfigurationProperty where
  type PropertyType "InvocationCondition" HookConfigurationProperty = DocumentAttributeConditionProperty
  set :: PropertyType "InvocationCondition" HookConfigurationProperty
-> HookConfigurationProperty -> HookConfigurationProperty
set PropertyType "InvocationCondition" HookConfigurationProperty
newValue HookConfigurationProperty {Maybe DocumentAttributeConditionProperty
()
Value Text
haddock_workaround_ :: HookConfigurationProperty -> ()
invocationCondition :: HookConfigurationProperty
-> Maybe DocumentAttributeConditionProperty
lambdaArn :: HookConfigurationProperty -> Value Text
s3Bucket :: HookConfigurationProperty -> Value Text
haddock_workaround_ :: ()
invocationCondition :: Maybe DocumentAttributeConditionProperty
lambdaArn :: Value Text
s3Bucket :: Value Text
..}
    = HookConfigurationProperty
        {invocationCondition :: Maybe DocumentAttributeConditionProperty
invocationCondition = DocumentAttributeConditionProperty
-> Maybe DocumentAttributeConditionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InvocationCondition" HookConfigurationProperty
DocumentAttributeConditionProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
lambdaArn :: Value Text
s3Bucket :: Value Text
haddock_workaround_ :: ()
lambdaArn :: Value Text
s3Bucket :: Value Text
..}
instance Property "LambdaArn" HookConfigurationProperty where
  type PropertyType "LambdaArn" HookConfigurationProperty = Value Prelude.Text
  set :: PropertyType "LambdaArn" HookConfigurationProperty
-> HookConfigurationProperty -> HookConfigurationProperty
set PropertyType "LambdaArn" HookConfigurationProperty
newValue HookConfigurationProperty {Maybe DocumentAttributeConditionProperty
()
Value Text
haddock_workaround_ :: HookConfigurationProperty -> ()
invocationCondition :: HookConfigurationProperty
-> Maybe DocumentAttributeConditionProperty
lambdaArn :: HookConfigurationProperty -> Value Text
s3Bucket :: HookConfigurationProperty -> Value Text
haddock_workaround_ :: ()
invocationCondition :: Maybe DocumentAttributeConditionProperty
lambdaArn :: Value Text
s3Bucket :: Value Text
..}
    = HookConfigurationProperty {lambdaArn :: Value Text
lambdaArn = PropertyType "LambdaArn" HookConfigurationProperty
Value Text
newValue, Maybe DocumentAttributeConditionProperty
()
Value Text
haddock_workaround_ :: ()
invocationCondition :: Maybe DocumentAttributeConditionProperty
s3Bucket :: Value Text
haddock_workaround_ :: ()
invocationCondition :: Maybe DocumentAttributeConditionProperty
s3Bucket :: Value Text
..}
instance Property "S3Bucket" HookConfigurationProperty where
  type PropertyType "S3Bucket" HookConfigurationProperty = Value Prelude.Text
  set :: PropertyType "S3Bucket" HookConfigurationProperty
-> HookConfigurationProperty -> HookConfigurationProperty
set PropertyType "S3Bucket" HookConfigurationProperty
newValue HookConfigurationProperty {Maybe DocumentAttributeConditionProperty
()
Value Text
haddock_workaround_ :: HookConfigurationProperty -> ()
invocationCondition :: HookConfigurationProperty
-> Maybe DocumentAttributeConditionProperty
lambdaArn :: HookConfigurationProperty -> Value Text
s3Bucket :: HookConfigurationProperty -> Value Text
haddock_workaround_ :: ()
invocationCondition :: Maybe DocumentAttributeConditionProperty
lambdaArn :: Value Text
s3Bucket :: Value Text
..}
    = HookConfigurationProperty {s3Bucket :: Value Text
s3Bucket = PropertyType "S3Bucket" HookConfigurationProperty
Value Text
newValue, Maybe DocumentAttributeConditionProperty
()
Value Text
haddock_workaround_ :: ()
invocationCondition :: Maybe DocumentAttributeConditionProperty
lambdaArn :: Value Text
haddock_workaround_ :: ()
invocationCondition :: Maybe DocumentAttributeConditionProperty
lambdaArn :: Value Text
..}