module Stratosphere.Bedrock.DataSource.WebDataSourceConfigurationProperty (
        module Exports, WebDataSourceConfigurationProperty(..),
        mkWebDataSourceConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Bedrock.DataSource.WebCrawlerConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.Bedrock.DataSource.WebSourceConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data WebDataSourceConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-datasource-webdatasourceconfiguration.html>
    WebDataSourceConfigurationProperty {WebDataSourceConfigurationProperty -> ()
haddock_workaround_ :: (),
                                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-datasource-webdatasourceconfiguration.html#cfn-bedrock-datasource-webdatasourceconfiguration-crawlerconfiguration>
                                        WebDataSourceConfigurationProperty
-> Maybe WebCrawlerConfigurationProperty
crawlerConfiguration :: (Prelude.Maybe WebCrawlerConfigurationProperty),
                                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-datasource-webdatasourceconfiguration.html#cfn-bedrock-datasource-webdatasourceconfiguration-sourceconfiguration>
                                        WebDataSourceConfigurationProperty
-> WebSourceConfigurationProperty
sourceConfiguration :: WebSourceConfigurationProperty}
  deriving stock (WebDataSourceConfigurationProperty
-> WebDataSourceConfigurationProperty -> Bool
(WebDataSourceConfigurationProperty
 -> WebDataSourceConfigurationProperty -> Bool)
-> (WebDataSourceConfigurationProperty
    -> WebDataSourceConfigurationProperty -> Bool)
-> Eq WebDataSourceConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WebDataSourceConfigurationProperty
-> WebDataSourceConfigurationProperty -> Bool
== :: WebDataSourceConfigurationProperty
-> WebDataSourceConfigurationProperty -> Bool
$c/= :: WebDataSourceConfigurationProperty
-> WebDataSourceConfigurationProperty -> Bool
/= :: WebDataSourceConfigurationProperty
-> WebDataSourceConfigurationProperty -> Bool
Prelude.Eq, Int -> WebDataSourceConfigurationProperty -> ShowS
[WebDataSourceConfigurationProperty] -> ShowS
WebDataSourceConfigurationProperty -> String
(Int -> WebDataSourceConfigurationProperty -> ShowS)
-> (WebDataSourceConfigurationProperty -> String)
-> ([WebDataSourceConfigurationProperty] -> ShowS)
-> Show WebDataSourceConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WebDataSourceConfigurationProperty -> ShowS
showsPrec :: Int -> WebDataSourceConfigurationProperty -> ShowS
$cshow :: WebDataSourceConfigurationProperty -> String
show :: WebDataSourceConfigurationProperty -> String
$cshowList :: [WebDataSourceConfigurationProperty] -> ShowS
showList :: [WebDataSourceConfigurationProperty] -> ShowS
Prelude.Show)
mkWebDataSourceConfigurationProperty ::
  WebSourceConfigurationProperty
  -> WebDataSourceConfigurationProperty
mkWebDataSourceConfigurationProperty :: WebSourceConfigurationProperty
-> WebDataSourceConfigurationProperty
mkWebDataSourceConfigurationProperty WebSourceConfigurationProperty
sourceConfiguration
  = WebDataSourceConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       sourceConfiguration :: WebSourceConfigurationProperty
sourceConfiguration = WebSourceConfigurationProperty
sourceConfiguration,
       crawlerConfiguration :: Maybe WebCrawlerConfigurationProperty
crawlerConfiguration = Maybe WebCrawlerConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties WebDataSourceConfigurationProperty where
  toResourceProperties :: WebDataSourceConfigurationProperty -> ResourceProperties
toResourceProperties WebDataSourceConfigurationProperty {Maybe WebCrawlerConfigurationProperty
()
WebSourceConfigurationProperty
haddock_workaround_ :: WebDataSourceConfigurationProperty -> ()
crawlerConfiguration :: WebDataSourceConfigurationProperty
-> Maybe WebCrawlerConfigurationProperty
sourceConfiguration :: WebDataSourceConfigurationProperty
-> WebSourceConfigurationProperty
haddock_workaround_ :: ()
crawlerConfiguration :: Maybe WebCrawlerConfigurationProperty
sourceConfiguration :: WebSourceConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Bedrock::DataSource.WebDataSourceConfiguration",
         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
"SourceConfiguration" Key -> WebSourceConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= WebSourceConfigurationProperty
sourceConfiguration]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> WebCrawlerConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CrawlerConfiguration"
                                 (WebCrawlerConfigurationProperty -> (Key, Value))
-> Maybe WebCrawlerConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WebCrawlerConfigurationProperty
crawlerConfiguration]))}
instance JSON.ToJSON WebDataSourceConfigurationProperty where
  toJSON :: WebDataSourceConfigurationProperty -> Value
toJSON WebDataSourceConfigurationProperty {Maybe WebCrawlerConfigurationProperty
()
WebSourceConfigurationProperty
haddock_workaround_ :: WebDataSourceConfigurationProperty -> ()
crawlerConfiguration :: WebDataSourceConfigurationProperty
-> Maybe WebCrawlerConfigurationProperty
sourceConfiguration :: WebDataSourceConfigurationProperty
-> WebSourceConfigurationProperty
haddock_workaround_ :: ()
crawlerConfiguration :: Maybe WebCrawlerConfigurationProperty
sourceConfiguration :: WebSourceConfigurationProperty
..}
    = [(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
"SourceConfiguration" Key -> WebSourceConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= WebSourceConfigurationProperty
sourceConfiguration]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> WebCrawlerConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CrawlerConfiguration"
                    (WebCrawlerConfigurationProperty -> (Key, Value))
-> Maybe WebCrawlerConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WebCrawlerConfigurationProperty
crawlerConfiguration])))
instance Property "CrawlerConfiguration" WebDataSourceConfigurationProperty where
  type PropertyType "CrawlerConfiguration" WebDataSourceConfigurationProperty = WebCrawlerConfigurationProperty
  set :: PropertyType
  "CrawlerConfiguration" WebDataSourceConfigurationProperty
-> WebDataSourceConfigurationProperty
-> WebDataSourceConfigurationProperty
set PropertyType
  "CrawlerConfiguration" WebDataSourceConfigurationProperty
newValue WebDataSourceConfigurationProperty {Maybe WebCrawlerConfigurationProperty
()
WebSourceConfigurationProperty
haddock_workaround_ :: WebDataSourceConfigurationProperty -> ()
crawlerConfiguration :: WebDataSourceConfigurationProperty
-> Maybe WebCrawlerConfigurationProperty
sourceConfiguration :: WebDataSourceConfigurationProperty
-> WebSourceConfigurationProperty
haddock_workaround_ :: ()
crawlerConfiguration :: Maybe WebCrawlerConfigurationProperty
sourceConfiguration :: WebSourceConfigurationProperty
..}
    = WebDataSourceConfigurationProperty
        {crawlerConfiguration :: Maybe WebCrawlerConfigurationProperty
crawlerConfiguration = WebCrawlerConfigurationProperty
-> Maybe WebCrawlerConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CrawlerConfiguration" WebDataSourceConfigurationProperty
WebCrawlerConfigurationProperty
newValue, ()
WebSourceConfigurationProperty
haddock_workaround_ :: ()
sourceConfiguration :: WebSourceConfigurationProperty
haddock_workaround_ :: ()
sourceConfiguration :: WebSourceConfigurationProperty
..}
instance Property "SourceConfiguration" WebDataSourceConfigurationProperty where
  type PropertyType "SourceConfiguration" WebDataSourceConfigurationProperty = WebSourceConfigurationProperty
  set :: PropertyType
  "SourceConfiguration" WebDataSourceConfigurationProperty
-> WebDataSourceConfigurationProperty
-> WebDataSourceConfigurationProperty
set PropertyType
  "SourceConfiguration" WebDataSourceConfigurationProperty
newValue WebDataSourceConfigurationProperty {Maybe WebCrawlerConfigurationProperty
()
WebSourceConfigurationProperty
haddock_workaround_ :: WebDataSourceConfigurationProperty -> ()
crawlerConfiguration :: WebDataSourceConfigurationProperty
-> Maybe WebCrawlerConfigurationProperty
sourceConfiguration :: WebDataSourceConfigurationProperty
-> WebSourceConfigurationProperty
haddock_workaround_ :: ()
crawlerConfiguration :: Maybe WebCrawlerConfigurationProperty
sourceConfiguration :: WebSourceConfigurationProperty
..}
    = WebDataSourceConfigurationProperty
        {sourceConfiguration :: WebSourceConfigurationProperty
sourceConfiguration = PropertyType
  "SourceConfiguration" WebDataSourceConfigurationProperty
WebSourceConfigurationProperty
newValue, Maybe WebCrawlerConfigurationProperty
()
haddock_workaround_ :: ()
crawlerConfiguration :: Maybe WebCrawlerConfigurationProperty
haddock_workaround_ :: ()
crawlerConfiguration :: Maybe WebCrawlerConfigurationProperty
..}