module Stratosphere.Glue.Crawler.RecrawlPolicyProperty (
        RecrawlPolicyProperty(..), mkRecrawlPolicyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RecrawlPolicyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-recrawlpolicy.html>
    RecrawlPolicyProperty {RecrawlPolicyProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-crawler-recrawlpolicy.html#cfn-glue-crawler-recrawlpolicy-recrawlbehavior>
                           RecrawlPolicyProperty -> Maybe (Value Text)
recrawlBehavior :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (RecrawlPolicyProperty -> RecrawlPolicyProperty -> Bool
(RecrawlPolicyProperty -> RecrawlPolicyProperty -> Bool)
-> (RecrawlPolicyProperty -> RecrawlPolicyProperty -> Bool)
-> Eq RecrawlPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RecrawlPolicyProperty -> RecrawlPolicyProperty -> Bool
== :: RecrawlPolicyProperty -> RecrawlPolicyProperty -> Bool
$c/= :: RecrawlPolicyProperty -> RecrawlPolicyProperty -> Bool
/= :: RecrawlPolicyProperty -> RecrawlPolicyProperty -> Bool
Prelude.Eq, Int -> RecrawlPolicyProperty -> ShowS
[RecrawlPolicyProperty] -> ShowS
RecrawlPolicyProperty -> String
(Int -> RecrawlPolicyProperty -> ShowS)
-> (RecrawlPolicyProperty -> String)
-> ([RecrawlPolicyProperty] -> ShowS)
-> Show RecrawlPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RecrawlPolicyProperty -> ShowS
showsPrec :: Int -> RecrawlPolicyProperty -> ShowS
$cshow :: RecrawlPolicyProperty -> String
show :: RecrawlPolicyProperty -> String
$cshowList :: [RecrawlPolicyProperty] -> ShowS
showList :: [RecrawlPolicyProperty] -> ShowS
Prelude.Show)
mkRecrawlPolicyProperty :: RecrawlPolicyProperty
mkRecrawlPolicyProperty :: RecrawlPolicyProperty
mkRecrawlPolicyProperty
  = RecrawlPolicyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), recrawlBehavior :: Maybe (Value Text)
recrawlBehavior = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RecrawlPolicyProperty where
  toResourceProperties :: RecrawlPolicyProperty -> ResourceProperties
toResourceProperties RecrawlPolicyProperty {Maybe (Value Text)
()
haddock_workaround_ :: RecrawlPolicyProperty -> ()
recrawlBehavior :: RecrawlPolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
recrawlBehavior :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Glue::Crawler.RecrawlPolicy",
         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
"RecrawlBehavior" (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)
recrawlBehavior])}
instance JSON.ToJSON RecrawlPolicyProperty where
  toJSON :: RecrawlPolicyProperty -> Value
toJSON RecrawlPolicyProperty {Maybe (Value Text)
()
haddock_workaround_ :: RecrawlPolicyProperty -> ()
recrawlBehavior :: RecrawlPolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
recrawlBehavior :: 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
"RecrawlBehavior" (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)
recrawlBehavior]))
instance Property "RecrawlBehavior" RecrawlPolicyProperty where
  type PropertyType "RecrawlBehavior" RecrawlPolicyProperty = Value Prelude.Text
  set :: PropertyType "RecrawlBehavior" RecrawlPolicyProperty
-> RecrawlPolicyProperty -> RecrawlPolicyProperty
set PropertyType "RecrawlBehavior" RecrawlPolicyProperty
newValue RecrawlPolicyProperty {Maybe (Value Text)
()
haddock_workaround_ :: RecrawlPolicyProperty -> ()
recrawlBehavior :: RecrawlPolicyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
recrawlBehavior :: Maybe (Value Text)
..}
    = RecrawlPolicyProperty
        {recrawlBehavior :: Maybe (Value Text)
recrawlBehavior = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RecrawlBehavior" RecrawlPolicyProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}