module Stratosphere.Kendra.DataSource.DocumentAttributeConditionProperty (
module Exports, DocumentAttributeConditionProperty(..),
mkDocumentAttributeConditionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Kendra.DataSource.DocumentAttributeValueProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DocumentAttributeConditionProperty
=
DocumentAttributeConditionProperty {DocumentAttributeConditionProperty -> ()
haddock_workaround_ :: (),
DocumentAttributeConditionProperty -> Value Text
conditionDocumentAttributeKey :: (Value Prelude.Text),
DocumentAttributeConditionProperty
-> Maybe DocumentAttributeValueProperty
conditionOnValue :: (Prelude.Maybe DocumentAttributeValueProperty),
DocumentAttributeConditionProperty -> Value Text
operator :: (Value Prelude.Text)}
deriving stock (DocumentAttributeConditionProperty
-> DocumentAttributeConditionProperty -> Bool
(DocumentAttributeConditionProperty
-> DocumentAttributeConditionProperty -> Bool)
-> (DocumentAttributeConditionProperty
-> DocumentAttributeConditionProperty -> Bool)
-> Eq DocumentAttributeConditionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DocumentAttributeConditionProperty
-> DocumentAttributeConditionProperty -> Bool
== :: DocumentAttributeConditionProperty
-> DocumentAttributeConditionProperty -> Bool
$c/= :: DocumentAttributeConditionProperty
-> DocumentAttributeConditionProperty -> Bool
/= :: DocumentAttributeConditionProperty
-> DocumentAttributeConditionProperty -> Bool
Prelude.Eq, Int -> DocumentAttributeConditionProperty -> ShowS
[DocumentAttributeConditionProperty] -> ShowS
DocumentAttributeConditionProperty -> String
(Int -> DocumentAttributeConditionProperty -> ShowS)
-> (DocumentAttributeConditionProperty -> String)
-> ([DocumentAttributeConditionProperty] -> ShowS)
-> Show DocumentAttributeConditionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DocumentAttributeConditionProperty -> ShowS
showsPrec :: Int -> DocumentAttributeConditionProperty -> ShowS
$cshow :: DocumentAttributeConditionProperty -> String
show :: DocumentAttributeConditionProperty -> String
$cshowList :: [DocumentAttributeConditionProperty] -> ShowS
showList :: [DocumentAttributeConditionProperty] -> ShowS
Prelude.Show)
mkDocumentAttributeConditionProperty ::
Value Prelude.Text
-> Value Prelude.Text -> DocumentAttributeConditionProperty
mkDocumentAttributeConditionProperty :: Value Text -> Value Text -> DocumentAttributeConditionProperty
mkDocumentAttributeConditionProperty
Value Text
conditionDocumentAttributeKey
Value Text
operator
= DocumentAttributeConditionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
conditionDocumentAttributeKey :: Value Text
conditionDocumentAttributeKey = Value Text
conditionDocumentAttributeKey,
operator :: Value Text
operator = Value Text
operator, conditionOnValue :: Maybe DocumentAttributeValueProperty
conditionOnValue = Maybe DocumentAttributeValueProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DocumentAttributeConditionProperty where
toResourceProperties :: DocumentAttributeConditionProperty -> ResourceProperties
toResourceProperties DocumentAttributeConditionProperty {Maybe DocumentAttributeValueProperty
()
Value Text
haddock_workaround_ :: DocumentAttributeConditionProperty -> ()
conditionDocumentAttributeKey :: DocumentAttributeConditionProperty -> Value Text
conditionOnValue :: DocumentAttributeConditionProperty
-> Maybe DocumentAttributeValueProperty
operator :: DocumentAttributeConditionProperty -> Value Text
haddock_workaround_ :: ()
conditionDocumentAttributeKey :: Value Text
conditionOnValue :: Maybe DocumentAttributeValueProperty
operator :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Kendra::DataSource.DocumentAttributeCondition",
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
"ConditionDocumentAttributeKey"
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
conditionDocumentAttributeKey,
Key
"Operator" 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
operator]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> DocumentAttributeValueProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConditionOnValue" (DocumentAttributeValueProperty -> (Key, Value))
-> Maybe DocumentAttributeValueProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentAttributeValueProperty
conditionOnValue]))}
instance JSON.ToJSON DocumentAttributeConditionProperty where
toJSON :: DocumentAttributeConditionProperty -> Value
toJSON DocumentAttributeConditionProperty {Maybe DocumentAttributeValueProperty
()
Value Text
haddock_workaround_ :: DocumentAttributeConditionProperty -> ()
conditionDocumentAttributeKey :: DocumentAttributeConditionProperty -> Value Text
conditionOnValue :: DocumentAttributeConditionProperty
-> Maybe DocumentAttributeValueProperty
operator :: DocumentAttributeConditionProperty -> Value Text
haddock_workaround_ :: ()
conditionDocumentAttributeKey :: Value Text
conditionOnValue :: Maybe DocumentAttributeValueProperty
operator :: 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
"ConditionDocumentAttributeKey"
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
conditionDocumentAttributeKey,
Key
"Operator" 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
operator]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> DocumentAttributeValueProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConditionOnValue" (DocumentAttributeValueProperty -> (Key, Value))
-> Maybe DocumentAttributeValueProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentAttributeValueProperty
conditionOnValue])))
instance Property "ConditionDocumentAttributeKey" DocumentAttributeConditionProperty where
type PropertyType "ConditionDocumentAttributeKey" DocumentAttributeConditionProperty = Value Prelude.Text
set :: PropertyType
"ConditionDocumentAttributeKey" DocumentAttributeConditionProperty
-> DocumentAttributeConditionProperty
-> DocumentAttributeConditionProperty
set PropertyType
"ConditionDocumentAttributeKey" DocumentAttributeConditionProperty
newValue DocumentAttributeConditionProperty {Maybe DocumentAttributeValueProperty
()
Value Text
haddock_workaround_ :: DocumentAttributeConditionProperty -> ()
conditionDocumentAttributeKey :: DocumentAttributeConditionProperty -> Value Text
conditionOnValue :: DocumentAttributeConditionProperty
-> Maybe DocumentAttributeValueProperty
operator :: DocumentAttributeConditionProperty -> Value Text
haddock_workaround_ :: ()
conditionDocumentAttributeKey :: Value Text
conditionOnValue :: Maybe DocumentAttributeValueProperty
operator :: Value Text
..}
= DocumentAttributeConditionProperty
{conditionDocumentAttributeKey :: Value Text
conditionDocumentAttributeKey = PropertyType
"ConditionDocumentAttributeKey" DocumentAttributeConditionProperty
Value Text
newValue, Maybe DocumentAttributeValueProperty
()
Value Text
haddock_workaround_ :: ()
conditionOnValue :: Maybe DocumentAttributeValueProperty
operator :: Value Text
haddock_workaround_ :: ()
conditionOnValue :: Maybe DocumentAttributeValueProperty
operator :: Value Text
..}
instance Property "ConditionOnValue" DocumentAttributeConditionProperty where
type PropertyType "ConditionOnValue" DocumentAttributeConditionProperty = DocumentAttributeValueProperty
set :: PropertyType "ConditionOnValue" DocumentAttributeConditionProperty
-> DocumentAttributeConditionProperty
-> DocumentAttributeConditionProperty
set PropertyType "ConditionOnValue" DocumentAttributeConditionProperty
newValue DocumentAttributeConditionProperty {Maybe DocumentAttributeValueProperty
()
Value Text
haddock_workaround_ :: DocumentAttributeConditionProperty -> ()
conditionDocumentAttributeKey :: DocumentAttributeConditionProperty -> Value Text
conditionOnValue :: DocumentAttributeConditionProperty
-> Maybe DocumentAttributeValueProperty
operator :: DocumentAttributeConditionProperty -> Value Text
haddock_workaround_ :: ()
conditionDocumentAttributeKey :: Value Text
conditionOnValue :: Maybe DocumentAttributeValueProperty
operator :: Value Text
..}
= DocumentAttributeConditionProperty
{conditionOnValue :: Maybe DocumentAttributeValueProperty
conditionOnValue = DocumentAttributeValueProperty
-> Maybe DocumentAttributeValueProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ConditionOnValue" DocumentAttributeConditionProperty
DocumentAttributeValueProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
conditionDocumentAttributeKey :: Value Text
operator :: Value Text
haddock_workaround_ :: ()
conditionDocumentAttributeKey :: Value Text
operator :: Value Text
..}
instance Property "Operator" DocumentAttributeConditionProperty where
type PropertyType "Operator" DocumentAttributeConditionProperty = Value Prelude.Text
set :: PropertyType "Operator" DocumentAttributeConditionProperty
-> DocumentAttributeConditionProperty
-> DocumentAttributeConditionProperty
set PropertyType "Operator" DocumentAttributeConditionProperty
newValue DocumentAttributeConditionProperty {Maybe DocumentAttributeValueProperty
()
Value Text
haddock_workaround_ :: DocumentAttributeConditionProperty -> ()
conditionDocumentAttributeKey :: DocumentAttributeConditionProperty -> Value Text
conditionOnValue :: DocumentAttributeConditionProperty
-> Maybe DocumentAttributeValueProperty
operator :: DocumentAttributeConditionProperty -> Value Text
haddock_workaround_ :: ()
conditionDocumentAttributeKey :: Value Text
conditionOnValue :: Maybe DocumentAttributeValueProperty
operator :: Value Text
..}
= DocumentAttributeConditionProperty {operator :: Value Text
operator = PropertyType "Operator" DocumentAttributeConditionProperty
Value Text
newValue, Maybe DocumentAttributeValueProperty
()
Value Text
haddock_workaround_ :: ()
conditionDocumentAttributeKey :: Value Text
conditionOnValue :: Maybe DocumentAttributeValueProperty
haddock_workaround_ :: ()
conditionDocumentAttributeKey :: Value Text
conditionOnValue :: Maybe DocumentAttributeValueProperty
..}