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