module Stratosphere.Kendra.Index.RelevanceProperty (
        module Exports, RelevanceProperty(..), mkRelevanceProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Kendra.Index.ValueImportanceItemProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RelevanceProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-index-relevance.html>
    RelevanceProperty {RelevanceProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-index-relevance.html#cfn-kendra-index-relevance-duration>
                       RelevanceProperty -> Maybe (Value Text)
duration :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-index-relevance.html#cfn-kendra-index-relevance-freshness>
                       RelevanceProperty -> Maybe (Value Bool)
freshness :: (Prelude.Maybe (Value Prelude.Bool)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-index-relevance.html#cfn-kendra-index-relevance-importance>
                       RelevanceProperty -> Maybe (Value Integer)
importance :: (Prelude.Maybe (Value Prelude.Integer)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-index-relevance.html#cfn-kendra-index-relevance-rankorder>
                       RelevanceProperty -> Maybe (Value Text)
rankOrder :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-index-relevance.html#cfn-kendra-index-relevance-valueimportanceitems>
                       RelevanceProperty -> Maybe [ValueImportanceItemProperty]
valueImportanceItems :: (Prelude.Maybe [ValueImportanceItemProperty])}
  deriving stock (RelevanceProperty -> RelevanceProperty -> Bool
(RelevanceProperty -> RelevanceProperty -> Bool)
-> (RelevanceProperty -> RelevanceProperty -> Bool)
-> Eq RelevanceProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RelevanceProperty -> RelevanceProperty -> Bool
== :: RelevanceProperty -> RelevanceProperty -> Bool
$c/= :: RelevanceProperty -> RelevanceProperty -> Bool
/= :: RelevanceProperty -> RelevanceProperty -> Bool
Prelude.Eq, Int -> RelevanceProperty -> ShowS
[RelevanceProperty] -> ShowS
RelevanceProperty -> String
(Int -> RelevanceProperty -> ShowS)
-> (RelevanceProperty -> String)
-> ([RelevanceProperty] -> ShowS)
-> Show RelevanceProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RelevanceProperty -> ShowS
showsPrec :: Int -> RelevanceProperty -> ShowS
$cshow :: RelevanceProperty -> String
show :: RelevanceProperty -> String
$cshowList :: [RelevanceProperty] -> ShowS
showList :: [RelevanceProperty] -> ShowS
Prelude.Show)
mkRelevanceProperty :: RelevanceProperty
mkRelevanceProperty :: RelevanceProperty
mkRelevanceProperty
  = RelevanceProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), duration :: Maybe (Value Text)
duration = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       freshness :: Maybe (Value Bool)
freshness = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing, importance :: Maybe (Value Integer)
importance = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       rankOrder :: Maybe (Value Text)
rankOrder = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       valueImportanceItems :: Maybe [ValueImportanceItemProperty]
valueImportanceItems = Maybe [ValueImportanceItemProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RelevanceProperty where
  toResourceProperties :: RelevanceProperty -> ResourceProperties
toResourceProperties RelevanceProperty {Maybe [ValueImportanceItemProperty]
Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: RelevanceProperty -> ()
duration :: RelevanceProperty -> Maybe (Value Text)
freshness :: RelevanceProperty -> Maybe (Value Bool)
importance :: RelevanceProperty -> Maybe (Value Integer)
rankOrder :: RelevanceProperty -> Maybe (Value Text)
valueImportanceItems :: RelevanceProperty -> Maybe [ValueImportanceItemProperty]
haddock_workaround_ :: ()
duration :: Maybe (Value Text)
freshness :: Maybe (Value Bool)
importance :: Maybe (Value Integer)
rankOrder :: Maybe (Value Text)
valueImportanceItems :: Maybe [ValueImportanceItemProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Kendra::Index.Relevance",
         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 -> 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..=) Key
"Duration" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
duration,
                            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
"Freshness" (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)
freshness,
                            Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Importance" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
importance,
                            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..=) Key
"RankOrder" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
rankOrder,
                            Key -> [ValueImportanceItemProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ValueImportanceItems"
                              ([ValueImportanceItemProperty] -> (Key, Value))
-> Maybe [ValueImportanceItemProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ValueImportanceItemProperty]
valueImportanceItems])}
instance JSON.ToJSON RelevanceProperty where
  toJSON :: RelevanceProperty -> Value
toJSON RelevanceProperty {Maybe [ValueImportanceItemProperty]
Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: RelevanceProperty -> ()
duration :: RelevanceProperty -> Maybe (Value Text)
freshness :: RelevanceProperty -> Maybe (Value Bool)
importance :: RelevanceProperty -> Maybe (Value Integer)
rankOrder :: RelevanceProperty -> Maybe (Value Text)
valueImportanceItems :: RelevanceProperty -> Maybe [ValueImportanceItemProperty]
haddock_workaround_ :: ()
duration :: Maybe (Value Text)
freshness :: Maybe (Value Bool)
importance :: Maybe (Value Integer)
rankOrder :: Maybe (Value Text)
valueImportanceItems :: Maybe [ValueImportanceItemProperty]
..}
    = [(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 -> 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..=) Key
"Duration" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
duration,
               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
"Freshness" (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)
freshness,
               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Importance" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
importance,
               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..=) Key
"RankOrder" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
rankOrder,
               Key -> [ValueImportanceItemProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ValueImportanceItems"
                 ([ValueImportanceItemProperty] -> (Key, Value))
-> Maybe [ValueImportanceItemProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ValueImportanceItemProperty]
valueImportanceItems]))
instance Property "Duration" RelevanceProperty where
  type PropertyType "Duration" RelevanceProperty = Value Prelude.Text
  set :: PropertyType "Duration" RelevanceProperty
-> RelevanceProperty -> RelevanceProperty
set PropertyType "Duration" RelevanceProperty
newValue RelevanceProperty {Maybe [ValueImportanceItemProperty]
Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: RelevanceProperty -> ()
duration :: RelevanceProperty -> Maybe (Value Text)
freshness :: RelevanceProperty -> Maybe (Value Bool)
importance :: RelevanceProperty -> Maybe (Value Integer)
rankOrder :: RelevanceProperty -> Maybe (Value Text)
valueImportanceItems :: RelevanceProperty -> Maybe [ValueImportanceItemProperty]
haddock_workaround_ :: ()
duration :: Maybe (Value Text)
freshness :: Maybe (Value Bool)
importance :: Maybe (Value Integer)
rankOrder :: Maybe (Value Text)
valueImportanceItems :: Maybe [ValueImportanceItemProperty]
..}
    = RelevanceProperty {duration :: Maybe (Value Text)
duration = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Duration" RelevanceProperty
Value Text
newValue, Maybe [ValueImportanceItemProperty]
Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
freshness :: Maybe (Value Bool)
importance :: Maybe (Value Integer)
rankOrder :: Maybe (Value Text)
valueImportanceItems :: Maybe [ValueImportanceItemProperty]
haddock_workaround_ :: ()
freshness :: Maybe (Value Bool)
importance :: Maybe (Value Integer)
rankOrder :: Maybe (Value Text)
valueImportanceItems :: Maybe [ValueImportanceItemProperty]
..}
instance Property "Freshness" RelevanceProperty where
  type PropertyType "Freshness" RelevanceProperty = Value Prelude.Bool
  set :: PropertyType "Freshness" RelevanceProperty
-> RelevanceProperty -> RelevanceProperty
set PropertyType "Freshness" RelevanceProperty
newValue RelevanceProperty {Maybe [ValueImportanceItemProperty]
Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: RelevanceProperty -> ()
duration :: RelevanceProperty -> Maybe (Value Text)
freshness :: RelevanceProperty -> Maybe (Value Bool)
importance :: RelevanceProperty -> Maybe (Value Integer)
rankOrder :: RelevanceProperty -> Maybe (Value Text)
valueImportanceItems :: RelevanceProperty -> Maybe [ValueImportanceItemProperty]
haddock_workaround_ :: ()
duration :: Maybe (Value Text)
freshness :: Maybe (Value Bool)
importance :: Maybe (Value Integer)
rankOrder :: Maybe (Value Text)
valueImportanceItems :: Maybe [ValueImportanceItemProperty]
..}
    = RelevanceProperty {freshness :: Maybe (Value Bool)
freshness = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Freshness" RelevanceProperty
Value Bool
newValue, Maybe [ValueImportanceItemProperty]
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
duration :: Maybe (Value Text)
importance :: Maybe (Value Integer)
rankOrder :: Maybe (Value Text)
valueImportanceItems :: Maybe [ValueImportanceItemProperty]
haddock_workaround_ :: ()
duration :: Maybe (Value Text)
importance :: Maybe (Value Integer)
rankOrder :: Maybe (Value Text)
valueImportanceItems :: Maybe [ValueImportanceItemProperty]
..}
instance Property "Importance" RelevanceProperty where
  type PropertyType "Importance" RelevanceProperty = Value Prelude.Integer
  set :: PropertyType "Importance" RelevanceProperty
-> RelevanceProperty -> RelevanceProperty
set PropertyType "Importance" RelevanceProperty
newValue RelevanceProperty {Maybe [ValueImportanceItemProperty]
Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: RelevanceProperty -> ()
duration :: RelevanceProperty -> Maybe (Value Text)
freshness :: RelevanceProperty -> Maybe (Value Bool)
importance :: RelevanceProperty -> Maybe (Value Integer)
rankOrder :: RelevanceProperty -> Maybe (Value Text)
valueImportanceItems :: RelevanceProperty -> Maybe [ValueImportanceItemProperty]
haddock_workaround_ :: ()
duration :: Maybe (Value Text)
freshness :: Maybe (Value Bool)
importance :: Maybe (Value Integer)
rankOrder :: Maybe (Value Text)
valueImportanceItems :: Maybe [ValueImportanceItemProperty]
..}
    = RelevanceProperty {importance :: Maybe (Value Integer)
importance = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Importance" RelevanceProperty
Value Integer
newValue, Maybe [ValueImportanceItemProperty]
Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
duration :: Maybe (Value Text)
freshness :: Maybe (Value Bool)
rankOrder :: Maybe (Value Text)
valueImportanceItems :: Maybe [ValueImportanceItemProperty]
haddock_workaround_ :: ()
duration :: Maybe (Value Text)
freshness :: Maybe (Value Bool)
rankOrder :: Maybe (Value Text)
valueImportanceItems :: Maybe [ValueImportanceItemProperty]
..}
instance Property "RankOrder" RelevanceProperty where
  type PropertyType "RankOrder" RelevanceProperty = Value Prelude.Text
  set :: PropertyType "RankOrder" RelevanceProperty
-> RelevanceProperty -> RelevanceProperty
set PropertyType "RankOrder" RelevanceProperty
newValue RelevanceProperty {Maybe [ValueImportanceItemProperty]
Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: RelevanceProperty -> ()
duration :: RelevanceProperty -> Maybe (Value Text)
freshness :: RelevanceProperty -> Maybe (Value Bool)
importance :: RelevanceProperty -> Maybe (Value Integer)
rankOrder :: RelevanceProperty -> Maybe (Value Text)
valueImportanceItems :: RelevanceProperty -> Maybe [ValueImportanceItemProperty]
haddock_workaround_ :: ()
duration :: Maybe (Value Text)
freshness :: Maybe (Value Bool)
importance :: Maybe (Value Integer)
rankOrder :: Maybe (Value Text)
valueImportanceItems :: Maybe [ValueImportanceItemProperty]
..}
    = RelevanceProperty {rankOrder :: Maybe (Value Text)
rankOrder = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RankOrder" RelevanceProperty
Value Text
newValue, Maybe [ValueImportanceItemProperty]
Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
duration :: Maybe (Value Text)
freshness :: Maybe (Value Bool)
importance :: Maybe (Value Integer)
valueImportanceItems :: Maybe [ValueImportanceItemProperty]
haddock_workaround_ :: ()
duration :: Maybe (Value Text)
freshness :: Maybe (Value Bool)
importance :: Maybe (Value Integer)
valueImportanceItems :: Maybe [ValueImportanceItemProperty]
..}
instance Property "ValueImportanceItems" RelevanceProperty where
  type PropertyType "ValueImportanceItems" RelevanceProperty = [ValueImportanceItemProperty]
  set :: PropertyType "ValueImportanceItems" RelevanceProperty
-> RelevanceProperty -> RelevanceProperty
set PropertyType "ValueImportanceItems" RelevanceProperty
newValue RelevanceProperty {Maybe [ValueImportanceItemProperty]
Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: RelevanceProperty -> ()
duration :: RelevanceProperty -> Maybe (Value Text)
freshness :: RelevanceProperty -> Maybe (Value Bool)
importance :: RelevanceProperty -> Maybe (Value Integer)
rankOrder :: RelevanceProperty -> Maybe (Value Text)
valueImportanceItems :: RelevanceProperty -> Maybe [ValueImportanceItemProperty]
haddock_workaround_ :: ()
duration :: Maybe (Value Text)
freshness :: Maybe (Value Bool)
importance :: Maybe (Value Integer)
rankOrder :: Maybe (Value Text)
valueImportanceItems :: Maybe [ValueImportanceItemProperty]
..}
    = RelevanceProperty
        {valueImportanceItems :: Maybe [ValueImportanceItemProperty]
valueImportanceItems = [ValueImportanceItemProperty]
-> Maybe [ValueImportanceItemProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ValueImportanceItemProperty]
PropertyType "ValueImportanceItems" RelevanceProperty
newValue, Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
duration :: Maybe (Value Text)
freshness :: Maybe (Value Bool)
importance :: Maybe (Value Integer)
rankOrder :: Maybe (Value Text)
haddock_workaround_ :: ()
duration :: Maybe (Value Text)
freshness :: Maybe (Value Bool)
importance :: Maybe (Value Integer)
rankOrder :: Maybe (Value Text)
..}