module Stratosphere.Glue.Crawler.ScheduleProperty (
ScheduleProperty(..), mkScheduleProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ScheduleProperty
=
ScheduleProperty {ScheduleProperty -> ()
haddock_workaround_ :: (),
ScheduleProperty -> Maybe (Value Text)
scheduleExpression :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (ScheduleProperty -> ScheduleProperty -> Bool
(ScheduleProperty -> ScheduleProperty -> Bool)
-> (ScheduleProperty -> ScheduleProperty -> Bool)
-> Eq ScheduleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ScheduleProperty -> ScheduleProperty -> Bool
== :: ScheduleProperty -> ScheduleProperty -> Bool
$c/= :: ScheduleProperty -> ScheduleProperty -> Bool
/= :: ScheduleProperty -> ScheduleProperty -> Bool
Prelude.Eq, Int -> ScheduleProperty -> ShowS
[ScheduleProperty] -> ShowS
ScheduleProperty -> String
(Int -> ScheduleProperty -> ShowS)
-> (ScheduleProperty -> String)
-> ([ScheduleProperty] -> ShowS)
-> Show ScheduleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ScheduleProperty -> ShowS
showsPrec :: Int -> ScheduleProperty -> ShowS
$cshow :: ScheduleProperty -> String
show :: ScheduleProperty -> String
$cshowList :: [ScheduleProperty] -> ShowS
showList :: [ScheduleProperty] -> ShowS
Prelude.Show)
mkScheduleProperty :: ScheduleProperty
mkScheduleProperty :: ScheduleProperty
mkScheduleProperty
= ScheduleProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), scheduleExpression :: Maybe (Value Text)
scheduleExpression = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ScheduleProperty where
toResourceProperties :: ScheduleProperty -> ResourceProperties
toResourceProperties ScheduleProperty {Maybe (Value Text)
()
haddock_workaround_ :: ScheduleProperty -> ()
scheduleExpression :: ScheduleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
scheduleExpression :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Glue::Crawler.Schedule",
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
"ScheduleExpression" (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)
scheduleExpression])}
instance JSON.ToJSON ScheduleProperty where
toJSON :: ScheduleProperty -> Value
toJSON ScheduleProperty {Maybe (Value Text)
()
haddock_workaround_ :: ScheduleProperty -> ()
scheduleExpression :: ScheduleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
scheduleExpression :: 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
"ScheduleExpression" (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)
scheduleExpression]))
instance Property "ScheduleExpression" ScheduleProperty where
type PropertyType "ScheduleExpression" ScheduleProperty = Value Prelude.Text
set :: PropertyType "ScheduleExpression" ScheduleProperty
-> ScheduleProperty -> ScheduleProperty
set PropertyType "ScheduleExpression" ScheduleProperty
newValue ScheduleProperty {Maybe (Value Text)
()
haddock_workaround_ :: ScheduleProperty -> ()
scheduleExpression :: ScheduleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
scheduleExpression :: Maybe (Value Text)
..}
= ScheduleProperty {scheduleExpression :: Maybe (Value Text)
scheduleExpression = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ScheduleExpression" ScheduleProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}