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