module Stratosphere.Wisdom.KnowledgeBase.CrawlerLimitsProperty (
CrawlerLimitsProperty(..), mkCrawlerLimitsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CrawlerLimitsProperty
=
CrawlerLimitsProperty {CrawlerLimitsProperty -> ()
haddock_workaround_ :: (),
CrawlerLimitsProperty -> Maybe (Value Double)
rateLimit :: (Prelude.Maybe (Value Prelude.Double))}
deriving stock (CrawlerLimitsProperty -> CrawlerLimitsProperty -> Bool
(CrawlerLimitsProperty -> CrawlerLimitsProperty -> Bool)
-> (CrawlerLimitsProperty -> CrawlerLimitsProperty -> Bool)
-> Eq CrawlerLimitsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CrawlerLimitsProperty -> CrawlerLimitsProperty -> Bool
== :: CrawlerLimitsProperty -> CrawlerLimitsProperty -> Bool
$c/= :: CrawlerLimitsProperty -> CrawlerLimitsProperty -> Bool
/= :: CrawlerLimitsProperty -> CrawlerLimitsProperty -> Bool
Prelude.Eq, Int -> CrawlerLimitsProperty -> ShowS
[CrawlerLimitsProperty] -> ShowS
CrawlerLimitsProperty -> String
(Int -> CrawlerLimitsProperty -> ShowS)
-> (CrawlerLimitsProperty -> String)
-> ([CrawlerLimitsProperty] -> ShowS)
-> Show CrawlerLimitsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CrawlerLimitsProperty -> ShowS
showsPrec :: Int -> CrawlerLimitsProperty -> ShowS
$cshow :: CrawlerLimitsProperty -> String
show :: CrawlerLimitsProperty -> String
$cshowList :: [CrawlerLimitsProperty] -> ShowS
showList :: [CrawlerLimitsProperty] -> ShowS
Prelude.Show)
mkCrawlerLimitsProperty :: CrawlerLimitsProperty
mkCrawlerLimitsProperty :: CrawlerLimitsProperty
mkCrawlerLimitsProperty
= CrawlerLimitsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), rateLimit :: Maybe (Value Double)
rateLimit = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CrawlerLimitsProperty where
toResourceProperties :: CrawlerLimitsProperty -> ResourceProperties
toResourceProperties CrawlerLimitsProperty {Maybe (Value Double)
()
haddock_workaround_ :: CrawlerLimitsProperty -> ()
rateLimit :: CrawlerLimitsProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
rateLimit :: Maybe (Value Double)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Wisdom::KnowledgeBase.CrawlerLimits",
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 Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RateLimit" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
rateLimit])}
instance JSON.ToJSON CrawlerLimitsProperty where
toJSON :: CrawlerLimitsProperty -> Value
toJSON CrawlerLimitsProperty {Maybe (Value Double)
()
haddock_workaround_ :: CrawlerLimitsProperty -> ()
rateLimit :: CrawlerLimitsProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
rateLimit :: Maybe (Value Double)
..}
= [(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 Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"RateLimit" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
rateLimit]))
instance Property "RateLimit" CrawlerLimitsProperty where
type PropertyType "RateLimit" CrawlerLimitsProperty = Value Prelude.Double
set :: PropertyType "RateLimit" CrawlerLimitsProperty
-> CrawlerLimitsProperty -> CrawlerLimitsProperty
set PropertyType "RateLimit" CrawlerLimitsProperty
newValue CrawlerLimitsProperty {Maybe (Value Double)
()
haddock_workaround_ :: CrawlerLimitsProperty -> ()
rateLimit :: CrawlerLimitsProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
rateLimit :: Maybe (Value Double)
..}
= CrawlerLimitsProperty {rateLimit :: Maybe (Value Double)
rateLimit = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RateLimit" CrawlerLimitsProperty
Value Double
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}