module Stratosphere.Kendra.DataSource.ConfluenceSpaceToIndexFieldMappingProperty (
        ConfluenceSpaceToIndexFieldMappingProperty(..),
        mkConfluenceSpaceToIndexFieldMappingProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConfluenceSpaceToIndexFieldMappingProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-confluencespacetoindexfieldmapping.html>
    ConfluenceSpaceToIndexFieldMappingProperty {ConfluenceSpaceToIndexFieldMappingProperty -> ()
haddock_workaround_ :: (),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-confluencespacetoindexfieldmapping.html#cfn-kendra-datasource-confluencespacetoindexfieldmapping-datasourcefieldname>
                                                ConfluenceSpaceToIndexFieldMappingProperty -> Value Text
dataSourceFieldName :: (Value Prelude.Text),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-confluencespacetoindexfieldmapping.html#cfn-kendra-datasource-confluencespacetoindexfieldmapping-datefieldformat>
                                                ConfluenceSpaceToIndexFieldMappingProperty -> Maybe (Value Text)
dateFieldFormat :: (Prelude.Maybe (Value Prelude.Text)),
                                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kendra-datasource-confluencespacetoindexfieldmapping.html#cfn-kendra-datasource-confluencespacetoindexfieldmapping-indexfieldname>
                                                ConfluenceSpaceToIndexFieldMappingProperty -> Value Text
indexFieldName :: (Value Prelude.Text)}
  deriving stock (ConfluenceSpaceToIndexFieldMappingProperty
-> ConfluenceSpaceToIndexFieldMappingProperty -> Bool
(ConfluenceSpaceToIndexFieldMappingProperty
 -> ConfluenceSpaceToIndexFieldMappingProperty -> Bool)
-> (ConfluenceSpaceToIndexFieldMappingProperty
    -> ConfluenceSpaceToIndexFieldMappingProperty -> Bool)
-> Eq ConfluenceSpaceToIndexFieldMappingProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConfluenceSpaceToIndexFieldMappingProperty
-> ConfluenceSpaceToIndexFieldMappingProperty -> Bool
== :: ConfluenceSpaceToIndexFieldMappingProperty
-> ConfluenceSpaceToIndexFieldMappingProperty -> Bool
$c/= :: ConfluenceSpaceToIndexFieldMappingProperty
-> ConfluenceSpaceToIndexFieldMappingProperty -> Bool
/= :: ConfluenceSpaceToIndexFieldMappingProperty
-> ConfluenceSpaceToIndexFieldMappingProperty -> Bool
Prelude.Eq, Int -> ConfluenceSpaceToIndexFieldMappingProperty -> ShowS
[ConfluenceSpaceToIndexFieldMappingProperty] -> ShowS
ConfluenceSpaceToIndexFieldMappingProperty -> String
(Int -> ConfluenceSpaceToIndexFieldMappingProperty -> ShowS)
-> (ConfluenceSpaceToIndexFieldMappingProperty -> String)
-> ([ConfluenceSpaceToIndexFieldMappingProperty] -> ShowS)
-> Show ConfluenceSpaceToIndexFieldMappingProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConfluenceSpaceToIndexFieldMappingProperty -> ShowS
showsPrec :: Int -> ConfluenceSpaceToIndexFieldMappingProperty -> ShowS
$cshow :: ConfluenceSpaceToIndexFieldMappingProperty -> String
show :: ConfluenceSpaceToIndexFieldMappingProperty -> String
$cshowList :: [ConfluenceSpaceToIndexFieldMappingProperty] -> ShowS
showList :: [ConfluenceSpaceToIndexFieldMappingProperty] -> ShowS
Prelude.Show)
mkConfluenceSpaceToIndexFieldMappingProperty ::
  Value Prelude.Text
  -> Value Prelude.Text -> ConfluenceSpaceToIndexFieldMappingProperty
mkConfluenceSpaceToIndexFieldMappingProperty :: Value Text
-> Value Text -> ConfluenceSpaceToIndexFieldMappingProperty
mkConfluenceSpaceToIndexFieldMappingProperty
  Value Text
dataSourceFieldName
  Value Text
indexFieldName
  = ConfluenceSpaceToIndexFieldMappingProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       dataSourceFieldName :: Value Text
dataSourceFieldName = Value Text
dataSourceFieldName,
       indexFieldName :: Value Text
indexFieldName = Value Text
indexFieldName, dateFieldFormat :: Maybe (Value Text)
dateFieldFormat = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConfluenceSpaceToIndexFieldMappingProperty where
  toResourceProperties :: ConfluenceSpaceToIndexFieldMappingProperty -> ResourceProperties
toResourceProperties
    ConfluenceSpaceToIndexFieldMappingProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConfluenceSpaceToIndexFieldMappingProperty -> ()
dataSourceFieldName :: ConfluenceSpaceToIndexFieldMappingProperty -> Value Text
dateFieldFormat :: ConfluenceSpaceToIndexFieldMappingProperty -> Maybe (Value Text)
indexFieldName :: ConfluenceSpaceToIndexFieldMappingProperty -> Value Text
haddock_workaround_ :: ()
dataSourceFieldName :: Value Text
dateFieldFormat :: Maybe (Value Text)
indexFieldName :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Kendra::DataSource.ConfluenceSpaceToIndexFieldMapping",
         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
"DataSourceFieldName" 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
dataSourceFieldName,
                            Key
"IndexFieldName" 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
indexFieldName]
                           ([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
"DateFieldFormat" (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)
dateFieldFormat]))}
instance JSON.ToJSON ConfluenceSpaceToIndexFieldMappingProperty where
  toJSON :: ConfluenceSpaceToIndexFieldMappingProperty -> Value
toJSON ConfluenceSpaceToIndexFieldMappingProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConfluenceSpaceToIndexFieldMappingProperty -> ()
dataSourceFieldName :: ConfluenceSpaceToIndexFieldMappingProperty -> Value Text
dateFieldFormat :: ConfluenceSpaceToIndexFieldMappingProperty -> Maybe (Value Text)
indexFieldName :: ConfluenceSpaceToIndexFieldMappingProperty -> Value Text
haddock_workaround_ :: ()
dataSourceFieldName :: Value Text
dateFieldFormat :: Maybe (Value Text)
indexFieldName :: 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
"DataSourceFieldName" 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
dataSourceFieldName,
               Key
"IndexFieldName" 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
indexFieldName]
              ([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
"DateFieldFormat" (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)
dateFieldFormat])))
instance Property "DataSourceFieldName" ConfluenceSpaceToIndexFieldMappingProperty where
  type PropertyType "DataSourceFieldName" ConfluenceSpaceToIndexFieldMappingProperty = Value Prelude.Text
  set :: PropertyType
  "DataSourceFieldName" ConfluenceSpaceToIndexFieldMappingProperty
-> ConfluenceSpaceToIndexFieldMappingProperty
-> ConfluenceSpaceToIndexFieldMappingProperty
set PropertyType
  "DataSourceFieldName" ConfluenceSpaceToIndexFieldMappingProperty
newValue ConfluenceSpaceToIndexFieldMappingProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConfluenceSpaceToIndexFieldMappingProperty -> ()
dataSourceFieldName :: ConfluenceSpaceToIndexFieldMappingProperty -> Value Text
dateFieldFormat :: ConfluenceSpaceToIndexFieldMappingProperty -> Maybe (Value Text)
indexFieldName :: ConfluenceSpaceToIndexFieldMappingProperty -> Value Text
haddock_workaround_ :: ()
dataSourceFieldName :: Value Text
dateFieldFormat :: Maybe (Value Text)
indexFieldName :: Value Text
..}
    = ConfluenceSpaceToIndexFieldMappingProperty
        {dataSourceFieldName :: Value Text
dataSourceFieldName = PropertyType
  "DataSourceFieldName" ConfluenceSpaceToIndexFieldMappingProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
dateFieldFormat :: Maybe (Value Text)
indexFieldName :: Value Text
haddock_workaround_ :: ()
dateFieldFormat :: Maybe (Value Text)
indexFieldName :: Value Text
..}
instance Property "DateFieldFormat" ConfluenceSpaceToIndexFieldMappingProperty where
  type PropertyType "DateFieldFormat" ConfluenceSpaceToIndexFieldMappingProperty = Value Prelude.Text
  set :: PropertyType
  "DateFieldFormat" ConfluenceSpaceToIndexFieldMappingProperty
-> ConfluenceSpaceToIndexFieldMappingProperty
-> ConfluenceSpaceToIndexFieldMappingProperty
set PropertyType
  "DateFieldFormat" ConfluenceSpaceToIndexFieldMappingProperty
newValue ConfluenceSpaceToIndexFieldMappingProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConfluenceSpaceToIndexFieldMappingProperty -> ()
dataSourceFieldName :: ConfluenceSpaceToIndexFieldMappingProperty -> Value Text
dateFieldFormat :: ConfluenceSpaceToIndexFieldMappingProperty -> Maybe (Value Text)
indexFieldName :: ConfluenceSpaceToIndexFieldMappingProperty -> Value Text
haddock_workaround_ :: ()
dataSourceFieldName :: Value Text
dateFieldFormat :: Maybe (Value Text)
indexFieldName :: Value Text
..}
    = ConfluenceSpaceToIndexFieldMappingProperty
        {dateFieldFormat :: Maybe (Value Text)
dateFieldFormat = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "DateFieldFormat" ConfluenceSpaceToIndexFieldMappingProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
dataSourceFieldName :: Value Text
indexFieldName :: Value Text
haddock_workaround_ :: ()
dataSourceFieldName :: Value Text
indexFieldName :: Value Text
..}
instance Property "IndexFieldName" ConfluenceSpaceToIndexFieldMappingProperty where
  type PropertyType "IndexFieldName" ConfluenceSpaceToIndexFieldMappingProperty = Value Prelude.Text
  set :: PropertyType
  "IndexFieldName" ConfluenceSpaceToIndexFieldMappingProperty
-> ConfluenceSpaceToIndexFieldMappingProperty
-> ConfluenceSpaceToIndexFieldMappingProperty
set PropertyType
  "IndexFieldName" ConfluenceSpaceToIndexFieldMappingProperty
newValue ConfluenceSpaceToIndexFieldMappingProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConfluenceSpaceToIndexFieldMappingProperty -> ()
dataSourceFieldName :: ConfluenceSpaceToIndexFieldMappingProperty -> Value Text
dateFieldFormat :: ConfluenceSpaceToIndexFieldMappingProperty -> Maybe (Value Text)
indexFieldName :: ConfluenceSpaceToIndexFieldMappingProperty -> Value Text
haddock_workaround_ :: ()
dataSourceFieldName :: Value Text
dateFieldFormat :: Maybe (Value Text)
indexFieldName :: Value Text
..}
    = ConfluenceSpaceToIndexFieldMappingProperty
        {indexFieldName :: Value Text
indexFieldName = PropertyType
  "IndexFieldName" ConfluenceSpaceToIndexFieldMappingProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
dataSourceFieldName :: Value Text
dateFieldFormat :: Maybe (Value Text)
haddock_workaround_ :: ()
dataSourceFieldName :: Value Text
dateFieldFormat :: Maybe (Value Text)
..}