module Stratosphere.QBusiness.Retriever.RetrieverConfigurationProperty (
        module Exports, RetrieverConfigurationProperty(..),
        mkRetrieverConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QBusiness.Retriever.KendraIndexConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.QBusiness.Retriever.NativeIndexConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data RetrieverConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-retriever-retrieverconfiguration.html>
    RetrieverConfigurationProperty {RetrieverConfigurationProperty -> ()
haddock_workaround_ :: (),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-retriever-retrieverconfiguration.html#cfn-qbusiness-retriever-retrieverconfiguration-kendraindexconfiguration>
                                    RetrieverConfigurationProperty
-> Maybe KendraIndexConfigurationProperty
kendraIndexConfiguration :: (Prelude.Maybe KendraIndexConfigurationProperty),
                                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-retriever-retrieverconfiguration.html#cfn-qbusiness-retriever-retrieverconfiguration-nativeindexconfiguration>
                                    RetrieverConfigurationProperty
-> Maybe NativeIndexConfigurationProperty
nativeIndexConfiguration :: (Prelude.Maybe NativeIndexConfigurationProperty)}
  deriving stock (RetrieverConfigurationProperty
-> RetrieverConfigurationProperty -> Bool
(RetrieverConfigurationProperty
 -> RetrieverConfigurationProperty -> Bool)
-> (RetrieverConfigurationProperty
    -> RetrieverConfigurationProperty -> Bool)
-> Eq RetrieverConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RetrieverConfigurationProperty
-> RetrieverConfigurationProperty -> Bool
== :: RetrieverConfigurationProperty
-> RetrieverConfigurationProperty -> Bool
$c/= :: RetrieverConfigurationProperty
-> RetrieverConfigurationProperty -> Bool
/= :: RetrieverConfigurationProperty
-> RetrieverConfigurationProperty -> Bool
Prelude.Eq, Int -> RetrieverConfigurationProperty -> ShowS
[RetrieverConfigurationProperty] -> ShowS
RetrieverConfigurationProperty -> String
(Int -> RetrieverConfigurationProperty -> ShowS)
-> (RetrieverConfigurationProperty -> String)
-> ([RetrieverConfigurationProperty] -> ShowS)
-> Show RetrieverConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RetrieverConfigurationProperty -> ShowS
showsPrec :: Int -> RetrieverConfigurationProperty -> ShowS
$cshow :: RetrieverConfigurationProperty -> String
show :: RetrieverConfigurationProperty -> String
$cshowList :: [RetrieverConfigurationProperty] -> ShowS
showList :: [RetrieverConfigurationProperty] -> ShowS
Prelude.Show)
mkRetrieverConfigurationProperty :: RetrieverConfigurationProperty
mkRetrieverConfigurationProperty :: RetrieverConfigurationProperty
mkRetrieverConfigurationProperty
  = RetrieverConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       kendraIndexConfiguration :: Maybe KendraIndexConfigurationProperty
kendraIndexConfiguration = Maybe KendraIndexConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       nativeIndexConfiguration :: Maybe NativeIndexConfigurationProperty
nativeIndexConfiguration = Maybe NativeIndexConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RetrieverConfigurationProperty where
  toResourceProperties :: RetrieverConfigurationProperty -> ResourceProperties
toResourceProperties RetrieverConfigurationProperty {Maybe KendraIndexConfigurationProperty
Maybe NativeIndexConfigurationProperty
()
haddock_workaround_ :: RetrieverConfigurationProperty -> ()
kendraIndexConfiguration :: RetrieverConfigurationProperty
-> Maybe KendraIndexConfigurationProperty
nativeIndexConfiguration :: RetrieverConfigurationProperty
-> Maybe NativeIndexConfigurationProperty
haddock_workaround_ :: ()
kendraIndexConfiguration :: Maybe KendraIndexConfigurationProperty
nativeIndexConfiguration :: Maybe NativeIndexConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QBusiness::Retriever.RetrieverConfiguration",
         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 -> KendraIndexConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KendraIndexConfiguration"
                              (KendraIndexConfigurationProperty -> (Key, Value))
-> Maybe KendraIndexConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KendraIndexConfigurationProperty
kendraIndexConfiguration,
                            Key -> NativeIndexConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NativeIndexConfiguration"
                              (NativeIndexConfigurationProperty -> (Key, Value))
-> Maybe NativeIndexConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NativeIndexConfigurationProperty
nativeIndexConfiguration])}
instance JSON.ToJSON RetrieverConfigurationProperty where
  toJSON :: RetrieverConfigurationProperty -> Value
toJSON RetrieverConfigurationProperty {Maybe KendraIndexConfigurationProperty
Maybe NativeIndexConfigurationProperty
()
haddock_workaround_ :: RetrieverConfigurationProperty -> ()
kendraIndexConfiguration :: RetrieverConfigurationProperty
-> Maybe KendraIndexConfigurationProperty
nativeIndexConfiguration :: RetrieverConfigurationProperty
-> Maybe NativeIndexConfigurationProperty
haddock_workaround_ :: ()
kendraIndexConfiguration :: Maybe KendraIndexConfigurationProperty
nativeIndexConfiguration :: Maybe NativeIndexConfigurationProperty
..}
    = [(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 -> KendraIndexConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KendraIndexConfiguration"
                 (KendraIndexConfigurationProperty -> (Key, Value))
-> Maybe KendraIndexConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KendraIndexConfigurationProperty
kendraIndexConfiguration,
               Key -> NativeIndexConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NativeIndexConfiguration"
                 (NativeIndexConfigurationProperty -> (Key, Value))
-> Maybe NativeIndexConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NativeIndexConfigurationProperty
nativeIndexConfiguration]))
instance Property "KendraIndexConfiguration" RetrieverConfigurationProperty where
  type PropertyType "KendraIndexConfiguration" RetrieverConfigurationProperty = KendraIndexConfigurationProperty
  set :: PropertyType
  "KendraIndexConfiguration" RetrieverConfigurationProperty
-> RetrieverConfigurationProperty -> RetrieverConfigurationProperty
set PropertyType
  "KendraIndexConfiguration" RetrieverConfigurationProperty
newValue RetrieverConfigurationProperty {Maybe KendraIndexConfigurationProperty
Maybe NativeIndexConfigurationProperty
()
haddock_workaround_ :: RetrieverConfigurationProperty -> ()
kendraIndexConfiguration :: RetrieverConfigurationProperty
-> Maybe KendraIndexConfigurationProperty
nativeIndexConfiguration :: RetrieverConfigurationProperty
-> Maybe NativeIndexConfigurationProperty
haddock_workaround_ :: ()
kendraIndexConfiguration :: Maybe KendraIndexConfigurationProperty
nativeIndexConfiguration :: Maybe NativeIndexConfigurationProperty
..}
    = RetrieverConfigurationProperty
        {kendraIndexConfiguration :: Maybe KendraIndexConfigurationProperty
kendraIndexConfiguration = KendraIndexConfigurationProperty
-> Maybe KendraIndexConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "KendraIndexConfiguration" RetrieverConfigurationProperty
KendraIndexConfigurationProperty
newValue, Maybe NativeIndexConfigurationProperty
()
haddock_workaround_ :: ()
nativeIndexConfiguration :: Maybe NativeIndexConfigurationProperty
haddock_workaround_ :: ()
nativeIndexConfiguration :: Maybe NativeIndexConfigurationProperty
..}
instance Property "NativeIndexConfiguration" RetrieverConfigurationProperty where
  type PropertyType "NativeIndexConfiguration" RetrieverConfigurationProperty = NativeIndexConfigurationProperty
  set :: PropertyType
  "NativeIndexConfiguration" RetrieverConfigurationProperty
-> RetrieverConfigurationProperty -> RetrieverConfigurationProperty
set PropertyType
  "NativeIndexConfiguration" RetrieverConfigurationProperty
newValue RetrieverConfigurationProperty {Maybe KendraIndexConfigurationProperty
Maybe NativeIndexConfigurationProperty
()
haddock_workaround_ :: RetrieverConfigurationProperty -> ()
kendraIndexConfiguration :: RetrieverConfigurationProperty
-> Maybe KendraIndexConfigurationProperty
nativeIndexConfiguration :: RetrieverConfigurationProperty
-> Maybe NativeIndexConfigurationProperty
haddock_workaround_ :: ()
kendraIndexConfiguration :: Maybe KendraIndexConfigurationProperty
nativeIndexConfiguration :: Maybe NativeIndexConfigurationProperty
..}
    = RetrieverConfigurationProperty
        {nativeIndexConfiguration :: Maybe NativeIndexConfigurationProperty
nativeIndexConfiguration = NativeIndexConfigurationProperty
-> Maybe NativeIndexConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "NativeIndexConfiguration" RetrieverConfigurationProperty
NativeIndexConfigurationProperty
newValue, Maybe KendraIndexConfigurationProperty
()
haddock_workaround_ :: ()
kendraIndexConfiguration :: Maybe KendraIndexConfigurationProperty
haddock_workaround_ :: ()
kendraIndexConfiguration :: Maybe KendraIndexConfigurationProperty
..}