module Stratosphere.OpenSearchServerless.Index.IndexProperty (
        IndexProperty(..), mkIndexProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IndexProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-index.html>
    IndexProperty {IndexProperty -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-index.html#cfn-opensearchserverless-index-index-knn>
                   IndexProperty -> Maybe (Value Bool)
knn :: (Prelude.Maybe (Value Prelude.Bool)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-index.html#cfn-opensearchserverless-index-index-knnalgoparamefsearch>
                   IndexProperty -> Maybe (Value Integer)
knnAlgoParamEfSearch :: (Prelude.Maybe (Value Prelude.Integer)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-opensearchserverless-index-index.html#cfn-opensearchserverless-index-index-refreshinterval>
                   IndexProperty -> Maybe (Value Text)
refreshInterval :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (IndexProperty -> IndexProperty -> Bool
(IndexProperty -> IndexProperty -> Bool)
-> (IndexProperty -> IndexProperty -> Bool) -> Eq IndexProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IndexProperty -> IndexProperty -> Bool
== :: IndexProperty -> IndexProperty -> Bool
$c/= :: IndexProperty -> IndexProperty -> Bool
/= :: IndexProperty -> IndexProperty -> Bool
Prelude.Eq, Int -> IndexProperty -> ShowS
[IndexProperty] -> ShowS
IndexProperty -> String
(Int -> IndexProperty -> ShowS)
-> (IndexProperty -> String)
-> ([IndexProperty] -> ShowS)
-> Show IndexProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IndexProperty -> ShowS
showsPrec :: Int -> IndexProperty -> ShowS
$cshow :: IndexProperty -> String
show :: IndexProperty -> String
$cshowList :: [IndexProperty] -> ShowS
showList :: [IndexProperty] -> ShowS
Prelude.Show)
mkIndexProperty :: IndexProperty
mkIndexProperty :: IndexProperty
mkIndexProperty
  = IndexProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), knn :: Maybe (Value Bool)
knn = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       knnAlgoParamEfSearch :: Maybe (Value Integer)
knnAlgoParamEfSearch = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       refreshInterval :: Maybe (Value Text)
refreshInterval = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IndexProperty where
  toResourceProperties :: IndexProperty -> ResourceProperties
toResourceProperties IndexProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: IndexProperty -> ()
knn :: IndexProperty -> Maybe (Value Bool)
knnAlgoParamEfSearch :: IndexProperty -> Maybe (Value Integer)
refreshInterval :: IndexProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
knn :: Maybe (Value Bool)
knnAlgoParamEfSearch :: Maybe (Value Integer)
refreshInterval :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::OpenSearchServerless::Index.Index",
         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 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
"Knn" (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)
knn,
                            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
"KnnAlgoParamEfSearch" (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)
knnAlgoParamEfSearch,
                            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
"RefreshInterval" (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)
refreshInterval])}
instance JSON.ToJSON IndexProperty where
  toJSON :: IndexProperty -> Value
toJSON IndexProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: IndexProperty -> ()
knn :: IndexProperty -> Maybe (Value Bool)
knnAlgoParamEfSearch :: IndexProperty -> Maybe (Value Integer)
refreshInterval :: IndexProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
knn :: Maybe (Value Bool)
knnAlgoParamEfSearch :: Maybe (Value Integer)
refreshInterval :: Maybe (Value Text)
..}
    = [(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 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
"Knn" (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)
knn,
               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
"KnnAlgoParamEfSearch" (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)
knnAlgoParamEfSearch,
               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
"RefreshInterval" (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)
refreshInterval]))
instance Property "Knn" IndexProperty where
  type PropertyType "Knn" IndexProperty = Value Prelude.Bool
  set :: PropertyType "Knn" IndexProperty -> IndexProperty -> IndexProperty
set PropertyType "Knn" IndexProperty
newValue IndexProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: IndexProperty -> ()
knn :: IndexProperty -> Maybe (Value Bool)
knnAlgoParamEfSearch :: IndexProperty -> Maybe (Value Integer)
refreshInterval :: IndexProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
knn :: Maybe (Value Bool)
knnAlgoParamEfSearch :: Maybe (Value Integer)
refreshInterval :: Maybe (Value Text)
..}
    = IndexProperty {knn :: Maybe (Value Bool)
knn = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Knn" IndexProperty
Value Bool
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
knnAlgoParamEfSearch :: Maybe (Value Integer)
refreshInterval :: Maybe (Value Text)
haddock_workaround_ :: ()
knnAlgoParamEfSearch :: Maybe (Value Integer)
refreshInterval :: Maybe (Value Text)
..}
instance Property "KnnAlgoParamEfSearch" IndexProperty where
  type PropertyType "KnnAlgoParamEfSearch" IndexProperty = Value Prelude.Integer
  set :: PropertyType "KnnAlgoParamEfSearch" IndexProperty
-> IndexProperty -> IndexProperty
set PropertyType "KnnAlgoParamEfSearch" IndexProperty
newValue IndexProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: IndexProperty -> ()
knn :: IndexProperty -> Maybe (Value Bool)
knnAlgoParamEfSearch :: IndexProperty -> Maybe (Value Integer)
refreshInterval :: IndexProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
knn :: Maybe (Value Bool)
knnAlgoParamEfSearch :: Maybe (Value Integer)
refreshInterval :: Maybe (Value Text)
..}
    = IndexProperty {knnAlgoParamEfSearch :: Maybe (Value Integer)
knnAlgoParamEfSearch = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KnnAlgoParamEfSearch" IndexProperty
Value Integer
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
knn :: Maybe (Value Bool)
refreshInterval :: Maybe (Value Text)
haddock_workaround_ :: ()
knn :: Maybe (Value Bool)
refreshInterval :: Maybe (Value Text)
..}
instance Property "RefreshInterval" IndexProperty where
  type PropertyType "RefreshInterval" IndexProperty = Value Prelude.Text
  set :: PropertyType "RefreshInterval" IndexProperty
-> IndexProperty -> IndexProperty
set PropertyType "RefreshInterval" IndexProperty
newValue IndexProperty {Maybe (Value Bool)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: IndexProperty -> ()
knn :: IndexProperty -> Maybe (Value Bool)
knnAlgoParamEfSearch :: IndexProperty -> Maybe (Value Integer)
refreshInterval :: IndexProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
knn :: Maybe (Value Bool)
knnAlgoParamEfSearch :: Maybe (Value Integer)
refreshInterval :: Maybe (Value Text)
..}
    = IndexProperty {refreshInterval :: Maybe (Value Text)
refreshInterval = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RefreshInterval" IndexProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Integer)
()
haddock_workaround_ :: ()
knn :: Maybe (Value Bool)
knnAlgoParamEfSearch :: Maybe (Value Integer)
haddock_workaround_ :: ()
knn :: Maybe (Value Bool)
knnAlgoParamEfSearch :: Maybe (Value Integer)
..}