module Stratosphere.Kendra.DataSource.DocumentAttributeTargetProperty (
module Exports, DocumentAttributeTargetProperty(..),
mkDocumentAttributeTargetProperty
) 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 DocumentAttributeTargetProperty
=
DocumentAttributeTargetProperty {DocumentAttributeTargetProperty -> ()
haddock_workaround_ :: (),
DocumentAttributeTargetProperty -> Value Text
targetDocumentAttributeKey :: (Value Prelude.Text),
DocumentAttributeTargetProperty
-> Maybe DocumentAttributeValueProperty
targetDocumentAttributeValue :: (Prelude.Maybe DocumentAttributeValueProperty),
DocumentAttributeTargetProperty -> Maybe (Value Bool)
targetDocumentAttributeValueDeletion :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (DocumentAttributeTargetProperty
-> DocumentAttributeTargetProperty -> Bool
(DocumentAttributeTargetProperty
-> DocumentAttributeTargetProperty -> Bool)
-> (DocumentAttributeTargetProperty
-> DocumentAttributeTargetProperty -> Bool)
-> Eq DocumentAttributeTargetProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DocumentAttributeTargetProperty
-> DocumentAttributeTargetProperty -> Bool
== :: DocumentAttributeTargetProperty
-> DocumentAttributeTargetProperty -> Bool
$c/= :: DocumentAttributeTargetProperty
-> DocumentAttributeTargetProperty -> Bool
/= :: DocumentAttributeTargetProperty
-> DocumentAttributeTargetProperty -> Bool
Prelude.Eq, Int -> DocumentAttributeTargetProperty -> ShowS
[DocumentAttributeTargetProperty] -> ShowS
DocumentAttributeTargetProperty -> String
(Int -> DocumentAttributeTargetProperty -> ShowS)
-> (DocumentAttributeTargetProperty -> String)
-> ([DocumentAttributeTargetProperty] -> ShowS)
-> Show DocumentAttributeTargetProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DocumentAttributeTargetProperty -> ShowS
showsPrec :: Int -> DocumentAttributeTargetProperty -> ShowS
$cshow :: DocumentAttributeTargetProperty -> String
show :: DocumentAttributeTargetProperty -> String
$cshowList :: [DocumentAttributeTargetProperty] -> ShowS
showList :: [DocumentAttributeTargetProperty] -> ShowS
Prelude.Show)
mkDocumentAttributeTargetProperty ::
Value Prelude.Text -> DocumentAttributeTargetProperty
mkDocumentAttributeTargetProperty :: Value Text -> DocumentAttributeTargetProperty
mkDocumentAttributeTargetProperty Value Text
targetDocumentAttributeKey
= DocumentAttributeTargetProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
targetDocumentAttributeKey :: Value Text
targetDocumentAttributeKey = Value Text
targetDocumentAttributeKey,
targetDocumentAttributeValue :: Maybe DocumentAttributeValueProperty
targetDocumentAttributeValue = Maybe DocumentAttributeValueProperty
forall a. Maybe a
Prelude.Nothing,
targetDocumentAttributeValueDeletion :: Maybe (Value Bool)
targetDocumentAttributeValueDeletion = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DocumentAttributeTargetProperty where
toResourceProperties :: DocumentAttributeTargetProperty -> ResourceProperties
toResourceProperties DocumentAttributeTargetProperty {Maybe (Value Bool)
Maybe DocumentAttributeValueProperty
()
Value Text
haddock_workaround_ :: DocumentAttributeTargetProperty -> ()
targetDocumentAttributeKey :: DocumentAttributeTargetProperty -> Value Text
targetDocumentAttributeValue :: DocumentAttributeTargetProperty
-> Maybe DocumentAttributeValueProperty
targetDocumentAttributeValueDeletion :: DocumentAttributeTargetProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
targetDocumentAttributeKey :: Value Text
targetDocumentAttributeValue :: Maybe DocumentAttributeValueProperty
targetDocumentAttributeValueDeletion :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Kendra::DataSource.DocumentAttributeTarget",
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
"TargetDocumentAttributeKey" 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
targetDocumentAttributeKey]
([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
"TargetDocumentAttributeValue"
(DocumentAttributeValueProperty -> (Key, Value))
-> Maybe DocumentAttributeValueProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentAttributeValueProperty
targetDocumentAttributeValue,
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
"TargetDocumentAttributeValueDeletion"
(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)
targetDocumentAttributeValueDeletion]))}
instance JSON.ToJSON DocumentAttributeTargetProperty where
toJSON :: DocumentAttributeTargetProperty -> Value
toJSON DocumentAttributeTargetProperty {Maybe (Value Bool)
Maybe DocumentAttributeValueProperty
()
Value Text
haddock_workaround_ :: DocumentAttributeTargetProperty -> ()
targetDocumentAttributeKey :: DocumentAttributeTargetProperty -> Value Text
targetDocumentAttributeValue :: DocumentAttributeTargetProperty
-> Maybe DocumentAttributeValueProperty
targetDocumentAttributeValueDeletion :: DocumentAttributeTargetProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
targetDocumentAttributeKey :: Value Text
targetDocumentAttributeValue :: Maybe DocumentAttributeValueProperty
targetDocumentAttributeValueDeletion :: Maybe (Value Bool)
..}
= [(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
"TargetDocumentAttributeKey" 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
targetDocumentAttributeKey]
([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
"TargetDocumentAttributeValue"
(DocumentAttributeValueProperty -> (Key, Value))
-> Maybe DocumentAttributeValueProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DocumentAttributeValueProperty
targetDocumentAttributeValue,
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
"TargetDocumentAttributeValueDeletion"
(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)
targetDocumentAttributeValueDeletion])))
instance Property "TargetDocumentAttributeKey" DocumentAttributeTargetProperty where
type PropertyType "TargetDocumentAttributeKey" DocumentAttributeTargetProperty = Value Prelude.Text
set :: PropertyType
"TargetDocumentAttributeKey" DocumentAttributeTargetProperty
-> DocumentAttributeTargetProperty
-> DocumentAttributeTargetProperty
set PropertyType
"TargetDocumentAttributeKey" DocumentAttributeTargetProperty
newValue DocumentAttributeTargetProperty {Maybe (Value Bool)
Maybe DocumentAttributeValueProperty
()
Value Text
haddock_workaround_ :: DocumentAttributeTargetProperty -> ()
targetDocumentAttributeKey :: DocumentAttributeTargetProperty -> Value Text
targetDocumentAttributeValue :: DocumentAttributeTargetProperty
-> Maybe DocumentAttributeValueProperty
targetDocumentAttributeValueDeletion :: DocumentAttributeTargetProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
targetDocumentAttributeKey :: Value Text
targetDocumentAttributeValue :: Maybe DocumentAttributeValueProperty
targetDocumentAttributeValueDeletion :: Maybe (Value Bool)
..}
= DocumentAttributeTargetProperty
{targetDocumentAttributeKey :: Value Text
targetDocumentAttributeKey = PropertyType
"TargetDocumentAttributeKey" DocumentAttributeTargetProperty
Value Text
newValue, Maybe (Value Bool)
Maybe DocumentAttributeValueProperty
()
haddock_workaround_ :: ()
targetDocumentAttributeValue :: Maybe DocumentAttributeValueProperty
targetDocumentAttributeValueDeletion :: Maybe (Value Bool)
haddock_workaround_ :: ()
targetDocumentAttributeValue :: Maybe DocumentAttributeValueProperty
targetDocumentAttributeValueDeletion :: Maybe (Value Bool)
..}
instance Property "TargetDocumentAttributeValue" DocumentAttributeTargetProperty where
type PropertyType "TargetDocumentAttributeValue" DocumentAttributeTargetProperty = DocumentAttributeValueProperty
set :: PropertyType
"TargetDocumentAttributeValue" DocumentAttributeTargetProperty
-> DocumentAttributeTargetProperty
-> DocumentAttributeTargetProperty
set PropertyType
"TargetDocumentAttributeValue" DocumentAttributeTargetProperty
newValue DocumentAttributeTargetProperty {Maybe (Value Bool)
Maybe DocumentAttributeValueProperty
()
Value Text
haddock_workaround_ :: DocumentAttributeTargetProperty -> ()
targetDocumentAttributeKey :: DocumentAttributeTargetProperty -> Value Text
targetDocumentAttributeValue :: DocumentAttributeTargetProperty
-> Maybe DocumentAttributeValueProperty
targetDocumentAttributeValueDeletion :: DocumentAttributeTargetProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
targetDocumentAttributeKey :: Value Text
targetDocumentAttributeValue :: Maybe DocumentAttributeValueProperty
targetDocumentAttributeValueDeletion :: Maybe (Value Bool)
..}
= DocumentAttributeTargetProperty
{targetDocumentAttributeValue :: Maybe DocumentAttributeValueProperty
targetDocumentAttributeValue = DocumentAttributeValueProperty
-> Maybe DocumentAttributeValueProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"TargetDocumentAttributeValue" DocumentAttributeTargetProperty
DocumentAttributeValueProperty
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
targetDocumentAttributeKey :: Value Text
targetDocumentAttributeValueDeletion :: Maybe (Value Bool)
haddock_workaround_ :: ()
targetDocumentAttributeKey :: Value Text
targetDocumentAttributeValueDeletion :: Maybe (Value Bool)
..}
instance Property "TargetDocumentAttributeValueDeletion" DocumentAttributeTargetProperty where
type PropertyType "TargetDocumentAttributeValueDeletion" DocumentAttributeTargetProperty = Value Prelude.Bool
set :: PropertyType
"TargetDocumentAttributeValueDeletion"
DocumentAttributeTargetProperty
-> DocumentAttributeTargetProperty
-> DocumentAttributeTargetProperty
set PropertyType
"TargetDocumentAttributeValueDeletion"
DocumentAttributeTargetProperty
newValue DocumentAttributeTargetProperty {Maybe (Value Bool)
Maybe DocumentAttributeValueProperty
()
Value Text
haddock_workaround_ :: DocumentAttributeTargetProperty -> ()
targetDocumentAttributeKey :: DocumentAttributeTargetProperty -> Value Text
targetDocumentAttributeValue :: DocumentAttributeTargetProperty
-> Maybe DocumentAttributeValueProperty
targetDocumentAttributeValueDeletion :: DocumentAttributeTargetProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
targetDocumentAttributeKey :: Value Text
targetDocumentAttributeValue :: Maybe DocumentAttributeValueProperty
targetDocumentAttributeValueDeletion :: Maybe (Value Bool)
..}
= DocumentAttributeTargetProperty
{targetDocumentAttributeValueDeletion :: Maybe (Value Bool)
targetDocumentAttributeValueDeletion = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"TargetDocumentAttributeValueDeletion"
DocumentAttributeTargetProperty
Value Bool
newValue, Maybe DocumentAttributeValueProperty
()
Value Text
haddock_workaround_ :: ()
targetDocumentAttributeKey :: Value Text
targetDocumentAttributeValue :: Maybe DocumentAttributeValueProperty
haddock_workaround_ :: ()
targetDocumentAttributeKey :: Value Text
targetDocumentAttributeValue :: Maybe DocumentAttributeValueProperty
..}