module Stratosphere.Kendra.Index.DocumentMetadataConfigurationProperty (
        module Exports, DocumentMetadataConfigurationProperty(..),
        mkDocumentMetadataConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Kendra.Index.RelevanceProperty as Exports
import {-# SOURCE #-} Stratosphere.Kendra.Index.SearchProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DocumentMetadataConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-index-documentmetadataconfiguration.html>
    DocumentMetadataConfigurationProperty {DocumentMetadataConfigurationProperty -> ()
haddock_workaround_ :: (),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-index-documentmetadataconfiguration.html#cfn-kendra-index-documentmetadataconfiguration-name>
                                           DocumentMetadataConfigurationProperty -> Value Text
name :: (Value Prelude.Text),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-index-documentmetadataconfiguration.html#cfn-kendra-index-documentmetadataconfiguration-relevance>
                                           DocumentMetadataConfigurationProperty -> Maybe RelevanceProperty
relevance :: (Prelude.Maybe RelevanceProperty),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-index-documentmetadataconfiguration.html#cfn-kendra-index-documentmetadataconfiguration-search>
                                           DocumentMetadataConfigurationProperty -> Maybe SearchProperty
search :: (Prelude.Maybe SearchProperty),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-index-documentmetadataconfiguration.html#cfn-kendra-index-documentmetadataconfiguration-type>
                                           DocumentMetadataConfigurationProperty -> Value Text
type' :: (Value Prelude.Text)}
  deriving stock (DocumentMetadataConfigurationProperty
-> DocumentMetadataConfigurationProperty -> Bool
(DocumentMetadataConfigurationProperty
 -> DocumentMetadataConfigurationProperty -> Bool)
-> (DocumentMetadataConfigurationProperty
    -> DocumentMetadataConfigurationProperty -> Bool)
-> Eq DocumentMetadataConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DocumentMetadataConfigurationProperty
-> DocumentMetadataConfigurationProperty -> Bool
== :: DocumentMetadataConfigurationProperty
-> DocumentMetadataConfigurationProperty -> Bool
$c/= :: DocumentMetadataConfigurationProperty
-> DocumentMetadataConfigurationProperty -> Bool
/= :: DocumentMetadataConfigurationProperty
-> DocumentMetadataConfigurationProperty -> Bool
Prelude.Eq, Int -> DocumentMetadataConfigurationProperty -> ShowS
[DocumentMetadataConfigurationProperty] -> ShowS
DocumentMetadataConfigurationProperty -> String
(Int -> DocumentMetadataConfigurationProperty -> ShowS)
-> (DocumentMetadataConfigurationProperty -> String)
-> ([DocumentMetadataConfigurationProperty] -> ShowS)
-> Show DocumentMetadataConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DocumentMetadataConfigurationProperty -> ShowS
showsPrec :: Int -> DocumentMetadataConfigurationProperty -> ShowS
$cshow :: DocumentMetadataConfigurationProperty -> String
show :: DocumentMetadataConfigurationProperty -> String
$cshowList :: [DocumentMetadataConfigurationProperty] -> ShowS
showList :: [DocumentMetadataConfigurationProperty] -> ShowS
Prelude.Show)
mkDocumentMetadataConfigurationProperty ::
  Value Prelude.Text
  -> Value Prelude.Text -> DocumentMetadataConfigurationProperty
mkDocumentMetadataConfigurationProperty :: Value Text -> Value Text -> DocumentMetadataConfigurationProperty
mkDocumentMetadataConfigurationProperty Value Text
name Value Text
type'
  = DocumentMetadataConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, type' :: Value Text
type' = Value Text
type',
       relevance :: Maybe RelevanceProperty
relevance = Maybe RelevanceProperty
forall a. Maybe a
Prelude.Nothing, search :: Maybe SearchProperty
search = Maybe SearchProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DocumentMetadataConfigurationProperty where
  toResourceProperties :: DocumentMetadataConfigurationProperty -> ResourceProperties
toResourceProperties DocumentMetadataConfigurationProperty {Maybe SearchProperty
Maybe RelevanceProperty
()
Value Text
haddock_workaround_ :: DocumentMetadataConfigurationProperty -> ()
name :: DocumentMetadataConfigurationProperty -> Value Text
relevance :: DocumentMetadataConfigurationProperty -> Maybe RelevanceProperty
search :: DocumentMetadataConfigurationProperty -> Maybe SearchProperty
type' :: DocumentMetadataConfigurationProperty -> Value Text
haddock_workaround_ :: ()
name :: Value Text
relevance :: Maybe RelevanceProperty
search :: Maybe SearchProperty
type' :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Kendra::Index.DocumentMetadataConfiguration",
         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
"Name" 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
name, Key
"Type" 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
type']
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> RelevanceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Relevance" (RelevanceProperty -> (Key, Value))
-> Maybe RelevanceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RelevanceProperty
relevance,
                               Key -> SearchProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Search" (SearchProperty -> (Key, Value))
-> Maybe SearchProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SearchProperty
search]))}
instance JSON.ToJSON DocumentMetadataConfigurationProperty where
  toJSON :: DocumentMetadataConfigurationProperty -> Value
toJSON DocumentMetadataConfigurationProperty {Maybe SearchProperty
Maybe RelevanceProperty
()
Value Text
haddock_workaround_ :: DocumentMetadataConfigurationProperty -> ()
name :: DocumentMetadataConfigurationProperty -> Value Text
relevance :: DocumentMetadataConfigurationProperty -> Maybe RelevanceProperty
search :: DocumentMetadataConfigurationProperty -> Maybe SearchProperty
type' :: DocumentMetadataConfigurationProperty -> Value Text
haddock_workaround_ :: ()
name :: Value Text
relevance :: Maybe RelevanceProperty
search :: Maybe SearchProperty
type' :: 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
"Name" 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
name, Key
"Type" 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
type']
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> RelevanceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Relevance" (RelevanceProperty -> (Key, Value))
-> Maybe RelevanceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RelevanceProperty
relevance,
                  Key -> SearchProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Search" (SearchProperty -> (Key, Value))
-> Maybe SearchProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SearchProperty
search])))
instance Property "Name" DocumentMetadataConfigurationProperty where
  type PropertyType "Name" DocumentMetadataConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Name" DocumentMetadataConfigurationProperty
-> DocumentMetadataConfigurationProperty
-> DocumentMetadataConfigurationProperty
set PropertyType "Name" DocumentMetadataConfigurationProperty
newValue DocumentMetadataConfigurationProperty {Maybe SearchProperty
Maybe RelevanceProperty
()
Value Text
haddock_workaround_ :: DocumentMetadataConfigurationProperty -> ()
name :: DocumentMetadataConfigurationProperty -> Value Text
relevance :: DocumentMetadataConfigurationProperty -> Maybe RelevanceProperty
search :: DocumentMetadataConfigurationProperty -> Maybe SearchProperty
type' :: DocumentMetadataConfigurationProperty -> Value Text
haddock_workaround_ :: ()
name :: Value Text
relevance :: Maybe RelevanceProperty
search :: Maybe SearchProperty
type' :: Value Text
..}
    = DocumentMetadataConfigurationProperty {name :: Value Text
name = PropertyType "Name" DocumentMetadataConfigurationProperty
Value Text
newValue, Maybe SearchProperty
Maybe RelevanceProperty
()
Value Text
haddock_workaround_ :: ()
relevance :: Maybe RelevanceProperty
search :: Maybe SearchProperty
type' :: Value Text
haddock_workaround_ :: ()
relevance :: Maybe RelevanceProperty
search :: Maybe SearchProperty
type' :: Value Text
..}
instance Property "Relevance" DocumentMetadataConfigurationProperty where
  type PropertyType "Relevance" DocumentMetadataConfigurationProperty = RelevanceProperty
  set :: PropertyType "Relevance" DocumentMetadataConfigurationProperty
-> DocumentMetadataConfigurationProperty
-> DocumentMetadataConfigurationProperty
set PropertyType "Relevance" DocumentMetadataConfigurationProperty
newValue DocumentMetadataConfigurationProperty {Maybe SearchProperty
Maybe RelevanceProperty
()
Value Text
haddock_workaround_ :: DocumentMetadataConfigurationProperty -> ()
name :: DocumentMetadataConfigurationProperty -> Value Text
relevance :: DocumentMetadataConfigurationProperty -> Maybe RelevanceProperty
search :: DocumentMetadataConfigurationProperty -> Maybe SearchProperty
type' :: DocumentMetadataConfigurationProperty -> Value Text
haddock_workaround_ :: ()
name :: Value Text
relevance :: Maybe RelevanceProperty
search :: Maybe SearchProperty
type' :: Value Text
..}
    = DocumentMetadataConfigurationProperty
        {relevance :: Maybe RelevanceProperty
relevance = RelevanceProperty -> Maybe RelevanceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Relevance" DocumentMetadataConfigurationProperty
RelevanceProperty
newValue, Maybe SearchProperty
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
search :: Maybe SearchProperty
type' :: Value Text
haddock_workaround_ :: ()
name :: Value Text
search :: Maybe SearchProperty
type' :: Value Text
..}
instance Property "Search" DocumentMetadataConfigurationProperty where
  type PropertyType "Search" DocumentMetadataConfigurationProperty = SearchProperty
  set :: PropertyType "Search" DocumentMetadataConfigurationProperty
-> DocumentMetadataConfigurationProperty
-> DocumentMetadataConfigurationProperty
set PropertyType "Search" DocumentMetadataConfigurationProperty
newValue DocumentMetadataConfigurationProperty {Maybe SearchProperty
Maybe RelevanceProperty
()
Value Text
haddock_workaround_ :: DocumentMetadataConfigurationProperty -> ()
name :: DocumentMetadataConfigurationProperty -> Value Text
relevance :: DocumentMetadataConfigurationProperty -> Maybe RelevanceProperty
search :: DocumentMetadataConfigurationProperty -> Maybe SearchProperty
type' :: DocumentMetadataConfigurationProperty -> Value Text
haddock_workaround_ :: ()
name :: Value Text
relevance :: Maybe RelevanceProperty
search :: Maybe SearchProperty
type' :: Value Text
..}
    = DocumentMetadataConfigurationProperty
        {search :: Maybe SearchProperty
search = SearchProperty -> Maybe SearchProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Search" DocumentMetadataConfigurationProperty
SearchProperty
newValue, Maybe RelevanceProperty
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
relevance :: Maybe RelevanceProperty
type' :: Value Text
haddock_workaround_ :: ()
name :: Value Text
relevance :: Maybe RelevanceProperty
type' :: Value Text
..}
instance Property "Type" DocumentMetadataConfigurationProperty where
  type PropertyType "Type" DocumentMetadataConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Type" DocumentMetadataConfigurationProperty
-> DocumentMetadataConfigurationProperty
-> DocumentMetadataConfigurationProperty
set PropertyType "Type" DocumentMetadataConfigurationProperty
newValue DocumentMetadataConfigurationProperty {Maybe SearchProperty
Maybe RelevanceProperty
()
Value Text
haddock_workaround_ :: DocumentMetadataConfigurationProperty -> ()
name :: DocumentMetadataConfigurationProperty -> Value Text
relevance :: DocumentMetadataConfigurationProperty -> Maybe RelevanceProperty
search :: DocumentMetadataConfigurationProperty -> Maybe SearchProperty
type' :: DocumentMetadataConfigurationProperty -> Value Text
haddock_workaround_ :: ()
name :: Value Text
relevance :: Maybe RelevanceProperty
search :: Maybe SearchProperty
type' :: Value Text
..}
    = DocumentMetadataConfigurationProperty {type' :: Value Text
type' = PropertyType "Type" DocumentMetadataConfigurationProperty
Value Text
newValue, Maybe SearchProperty
Maybe RelevanceProperty
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
relevance :: Maybe RelevanceProperty
search :: Maybe SearchProperty
haddock_workaround_ :: ()
name :: Value Text
relevance :: Maybe RelevanceProperty
search :: Maybe SearchProperty
..}