module Stratosphere.Wisdom.KnowledgeBase.UrlConfigurationProperty (
        module Exports, UrlConfigurationProperty(..),
        mkUrlConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Wisdom.KnowledgeBase.SeedUrlProperty as Exports
import Stratosphere.ResourceProperties
data UrlConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wisdom-knowledgebase-urlconfiguration.html>
    UrlConfigurationProperty {UrlConfigurationProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wisdom-knowledgebase-urlconfiguration.html#cfn-wisdom-knowledgebase-urlconfiguration-seedurls>
                              UrlConfigurationProperty -> Maybe [SeedUrlProperty]
seedUrls :: (Prelude.Maybe [SeedUrlProperty])}
  deriving stock (UrlConfigurationProperty -> UrlConfigurationProperty -> Bool
(UrlConfigurationProperty -> UrlConfigurationProperty -> Bool)
-> (UrlConfigurationProperty -> UrlConfigurationProperty -> Bool)
-> Eq UrlConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UrlConfigurationProperty -> UrlConfigurationProperty -> Bool
== :: UrlConfigurationProperty -> UrlConfigurationProperty -> Bool
$c/= :: UrlConfigurationProperty -> UrlConfigurationProperty -> Bool
/= :: UrlConfigurationProperty -> UrlConfigurationProperty -> Bool
Prelude.Eq, Int -> UrlConfigurationProperty -> ShowS
[UrlConfigurationProperty] -> ShowS
UrlConfigurationProperty -> String
(Int -> UrlConfigurationProperty -> ShowS)
-> (UrlConfigurationProperty -> String)
-> ([UrlConfigurationProperty] -> ShowS)
-> Show UrlConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UrlConfigurationProperty -> ShowS
showsPrec :: Int -> UrlConfigurationProperty -> ShowS
$cshow :: UrlConfigurationProperty -> String
show :: UrlConfigurationProperty -> String
$cshowList :: [UrlConfigurationProperty] -> ShowS
showList :: [UrlConfigurationProperty] -> ShowS
Prelude.Show)
mkUrlConfigurationProperty :: UrlConfigurationProperty
mkUrlConfigurationProperty :: UrlConfigurationProperty
mkUrlConfigurationProperty
  = UrlConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), seedUrls :: Maybe [SeedUrlProperty]
seedUrls = Maybe [SeedUrlProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties UrlConfigurationProperty where
  toResourceProperties :: UrlConfigurationProperty -> ResourceProperties
toResourceProperties UrlConfigurationProperty {Maybe [SeedUrlProperty]
()
haddock_workaround_ :: UrlConfigurationProperty -> ()
seedUrls :: UrlConfigurationProperty -> Maybe [SeedUrlProperty]
haddock_workaround_ :: ()
seedUrls :: Maybe [SeedUrlProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Wisdom::KnowledgeBase.UrlConfiguration",
         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 -> [SeedUrlProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SeedUrls" ([SeedUrlProperty] -> (Key, Value))
-> Maybe [SeedUrlProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SeedUrlProperty]
seedUrls])}
instance JSON.ToJSON UrlConfigurationProperty where
  toJSON :: UrlConfigurationProperty -> Value
toJSON UrlConfigurationProperty {Maybe [SeedUrlProperty]
()
haddock_workaround_ :: UrlConfigurationProperty -> ()
seedUrls :: UrlConfigurationProperty -> Maybe [SeedUrlProperty]
haddock_workaround_ :: ()
seedUrls :: Maybe [SeedUrlProperty]
..}
    = [(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 -> [SeedUrlProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SeedUrls" ([SeedUrlProperty] -> (Key, Value))
-> Maybe [SeedUrlProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SeedUrlProperty]
seedUrls]))
instance Property "SeedUrls" UrlConfigurationProperty where
  type PropertyType "SeedUrls" UrlConfigurationProperty = [SeedUrlProperty]
  set :: PropertyType "SeedUrls" UrlConfigurationProperty
-> UrlConfigurationProperty -> UrlConfigurationProperty
set PropertyType "SeedUrls" UrlConfigurationProperty
newValue UrlConfigurationProperty {Maybe [SeedUrlProperty]
()
haddock_workaround_ :: UrlConfigurationProperty -> ()
seedUrls :: UrlConfigurationProperty -> Maybe [SeedUrlProperty]
haddock_workaround_ :: ()
seedUrls :: Maybe [SeedUrlProperty]
..}
    = UrlConfigurationProperty {seedUrls :: Maybe [SeedUrlProperty]
seedUrls = [SeedUrlProperty] -> Maybe [SeedUrlProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [SeedUrlProperty]
PropertyType "SeedUrls" UrlConfigurationProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}