module Stratosphere.Kendra.DataSource.ConfluencePageConfigurationProperty (
        module Exports, ConfluencePageConfigurationProperty(..),
        mkConfluencePageConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Kendra.DataSource.ConfluencePageToIndexFieldMappingProperty as Exports
import Stratosphere.ResourceProperties
data ConfluencePageConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-confluencepageconfiguration.html>
    ConfluencePageConfigurationProperty {ConfluencePageConfigurationProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-confluencepageconfiguration.html#cfn-kendra-datasource-confluencepageconfiguration-pagefieldmappings>
                                         ConfluencePageConfigurationProperty
-> Maybe [ConfluencePageToIndexFieldMappingProperty]
pageFieldMappings :: (Prelude.Maybe [ConfluencePageToIndexFieldMappingProperty])}
  deriving stock (ConfluencePageConfigurationProperty
-> ConfluencePageConfigurationProperty -> Bool
(ConfluencePageConfigurationProperty
 -> ConfluencePageConfigurationProperty -> Bool)
-> (ConfluencePageConfigurationProperty
    -> ConfluencePageConfigurationProperty -> Bool)
-> Eq ConfluencePageConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConfluencePageConfigurationProperty
-> ConfluencePageConfigurationProperty -> Bool
== :: ConfluencePageConfigurationProperty
-> ConfluencePageConfigurationProperty -> Bool
$c/= :: ConfluencePageConfigurationProperty
-> ConfluencePageConfigurationProperty -> Bool
/= :: ConfluencePageConfigurationProperty
-> ConfluencePageConfigurationProperty -> Bool
Prelude.Eq, Int -> ConfluencePageConfigurationProperty -> ShowS
[ConfluencePageConfigurationProperty] -> ShowS
ConfluencePageConfigurationProperty -> String
(Int -> ConfluencePageConfigurationProperty -> ShowS)
-> (ConfluencePageConfigurationProperty -> String)
-> ([ConfluencePageConfigurationProperty] -> ShowS)
-> Show ConfluencePageConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConfluencePageConfigurationProperty -> ShowS
showsPrec :: Int -> ConfluencePageConfigurationProperty -> ShowS
$cshow :: ConfluencePageConfigurationProperty -> String
show :: ConfluencePageConfigurationProperty -> String
$cshowList :: [ConfluencePageConfigurationProperty] -> ShowS
showList :: [ConfluencePageConfigurationProperty] -> ShowS
Prelude.Show)
mkConfluencePageConfigurationProperty ::
  ConfluencePageConfigurationProperty
mkConfluencePageConfigurationProperty :: ConfluencePageConfigurationProperty
mkConfluencePageConfigurationProperty
  = ConfluencePageConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), pageFieldMappings :: Maybe [ConfluencePageToIndexFieldMappingProperty]
pageFieldMappings = Maybe [ConfluencePageToIndexFieldMappingProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConfluencePageConfigurationProperty where
  toResourceProperties :: ConfluencePageConfigurationProperty -> ResourceProperties
toResourceProperties ConfluencePageConfigurationProperty {Maybe [ConfluencePageToIndexFieldMappingProperty]
()
haddock_workaround_ :: ConfluencePageConfigurationProperty -> ()
pageFieldMappings :: ConfluencePageConfigurationProperty
-> Maybe [ConfluencePageToIndexFieldMappingProperty]
haddock_workaround_ :: ()
pageFieldMappings :: Maybe [ConfluencePageToIndexFieldMappingProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Kendra::DataSource.ConfluencePageConfiguration",
         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 -> [ConfluencePageToIndexFieldMappingProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PageFieldMappings" ([ConfluencePageToIndexFieldMappingProperty] -> (Key, Value))
-> Maybe [ConfluencePageToIndexFieldMappingProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConfluencePageToIndexFieldMappingProperty]
pageFieldMappings])}
instance JSON.ToJSON ConfluencePageConfigurationProperty where
  toJSON :: ConfluencePageConfigurationProperty -> Value
toJSON ConfluencePageConfigurationProperty {Maybe [ConfluencePageToIndexFieldMappingProperty]
()
haddock_workaround_ :: ConfluencePageConfigurationProperty -> ()
pageFieldMappings :: ConfluencePageConfigurationProperty
-> Maybe [ConfluencePageToIndexFieldMappingProperty]
haddock_workaround_ :: ()
pageFieldMappings :: Maybe [ConfluencePageToIndexFieldMappingProperty]
..}
    = [(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 -> [ConfluencePageToIndexFieldMappingProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PageFieldMappings" ([ConfluencePageToIndexFieldMappingProperty] -> (Key, Value))
-> Maybe [ConfluencePageToIndexFieldMappingProperty]
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConfluencePageToIndexFieldMappingProperty]
pageFieldMappings]))
instance Property "PageFieldMappings" ConfluencePageConfigurationProperty where
  type PropertyType "PageFieldMappings" ConfluencePageConfigurationProperty = [ConfluencePageToIndexFieldMappingProperty]
  set :: PropertyType
  "PageFieldMappings" ConfluencePageConfigurationProperty
-> ConfluencePageConfigurationProperty
-> ConfluencePageConfigurationProperty
set PropertyType
  "PageFieldMappings" ConfluencePageConfigurationProperty
newValue ConfluencePageConfigurationProperty {Maybe [ConfluencePageToIndexFieldMappingProperty]
()
haddock_workaround_ :: ConfluencePageConfigurationProperty -> ()
pageFieldMappings :: ConfluencePageConfigurationProperty
-> Maybe [ConfluencePageToIndexFieldMappingProperty]
haddock_workaround_ :: ()
pageFieldMappings :: Maybe [ConfluencePageToIndexFieldMappingProperty]
..}
    = ConfluencePageConfigurationProperty
        {pageFieldMappings :: Maybe [ConfluencePageToIndexFieldMappingProperty]
pageFieldMappings = [ConfluencePageToIndexFieldMappingProperty]
-> Maybe [ConfluencePageToIndexFieldMappingProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ConfluencePageToIndexFieldMappingProperty]
PropertyType
  "PageFieldMappings" ConfluencePageConfigurationProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}