module Stratosphere.Scheduler.ScheduleGroup (
        ScheduleGroup(..), mkScheduleGroup
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data ScheduleGroup
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedulegroup.html>
    ScheduleGroup {ScheduleGroup -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedulegroup.html#cfn-scheduler-schedulegroup-name>
                   ScheduleGroup -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-scheduler-schedulegroup.html#cfn-scheduler-schedulegroup-tags>
                   ScheduleGroup -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (ScheduleGroup -> ScheduleGroup -> Bool
(ScheduleGroup -> ScheduleGroup -> Bool)
-> (ScheduleGroup -> ScheduleGroup -> Bool) -> Eq ScheduleGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ScheduleGroup -> ScheduleGroup -> Bool
== :: ScheduleGroup -> ScheduleGroup -> Bool
$c/= :: ScheduleGroup -> ScheduleGroup -> Bool
/= :: ScheduleGroup -> ScheduleGroup -> Bool
Prelude.Eq, Int -> ScheduleGroup -> ShowS
[ScheduleGroup] -> ShowS
ScheduleGroup -> String
(Int -> ScheduleGroup -> ShowS)
-> (ScheduleGroup -> String)
-> ([ScheduleGroup] -> ShowS)
-> Show ScheduleGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ScheduleGroup -> ShowS
showsPrec :: Int -> ScheduleGroup -> ShowS
$cshow :: ScheduleGroup -> String
show :: ScheduleGroup -> String
$cshowList :: [ScheduleGroup] -> ShowS
showList :: [ScheduleGroup] -> ShowS
Prelude.Show)
mkScheduleGroup :: ScheduleGroup
mkScheduleGroup :: ScheduleGroup
mkScheduleGroup
  = ScheduleGroup
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ScheduleGroup where
  toResourceProperties :: ScheduleGroup -> ResourceProperties
toResourceProperties ScheduleGroup {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ScheduleGroup -> ()
name :: ScheduleGroup -> Maybe (Value Text)
tags :: ScheduleGroup -> Maybe [Tag]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Scheduler::ScheduleGroup",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"Name" (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)
name,
                            Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])}
instance JSON.ToJSON ScheduleGroup where
  toJSON :: ScheduleGroup -> Value
toJSON ScheduleGroup {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ScheduleGroup -> ()
name :: ScheduleGroup -> Maybe (Value Text)
tags :: ScheduleGroup -> Maybe [Tag]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = [(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
"Name" (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)
name,
               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))
instance Property "Name" ScheduleGroup where
  type PropertyType "Name" ScheduleGroup = Value Prelude.Text
  set :: PropertyType "Name" ScheduleGroup -> ScheduleGroup -> ScheduleGroup
set PropertyType "Name" ScheduleGroup
newValue ScheduleGroup {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ScheduleGroup -> ()
name :: ScheduleGroup -> Maybe (Value Text)
tags :: ScheduleGroup -> Maybe [Tag]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ScheduleGroup {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" ScheduleGroup
Value Text
newValue, Maybe [Tag]
()
haddock_workaround_ :: ()
tags :: Maybe [Tag]
haddock_workaround_ :: ()
tags :: Maybe [Tag]
..}
instance Property "Tags" ScheduleGroup where
  type PropertyType "Tags" ScheduleGroup = [Tag]
  set :: PropertyType "Tags" ScheduleGroup -> ScheduleGroup -> ScheduleGroup
set PropertyType "Tags" ScheduleGroup
newValue ScheduleGroup {Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ScheduleGroup -> ()
name :: ScheduleGroup -> Maybe (Value Text)
tags :: ScheduleGroup -> Maybe [Tag]
haddock_workaround_ :: ()
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ScheduleGroup {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" ScheduleGroup
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}