module Stratosphere.DataZone.DataSource.ScheduleConfigurationProperty (
        ScheduleConfigurationProperty(..), mkScheduleConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ScheduleConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datazone-datasource-scheduleconfiguration.html>
    ScheduleConfigurationProperty {ScheduleConfigurationProperty -> ()
haddock_workaround_ :: (),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datazone-datasource-scheduleconfiguration.html#cfn-datazone-datasource-scheduleconfiguration-schedule>
                                   ScheduleConfigurationProperty -> Maybe (Value Text)
schedule :: (Prelude.Maybe (Value Prelude.Text)),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datazone-datasource-scheduleconfiguration.html#cfn-datazone-datasource-scheduleconfiguration-timezone>
                                   ScheduleConfigurationProperty -> Maybe (Value Text)
timezone :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ScheduleConfigurationProperty
-> ScheduleConfigurationProperty -> Bool
(ScheduleConfigurationProperty
 -> ScheduleConfigurationProperty -> Bool)
-> (ScheduleConfigurationProperty
    -> ScheduleConfigurationProperty -> Bool)
-> Eq ScheduleConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ScheduleConfigurationProperty
-> ScheduleConfigurationProperty -> Bool
== :: ScheduleConfigurationProperty
-> ScheduleConfigurationProperty -> Bool
$c/= :: ScheduleConfigurationProperty
-> ScheduleConfigurationProperty -> Bool
/= :: ScheduleConfigurationProperty
-> ScheduleConfigurationProperty -> Bool
Prelude.Eq, Int -> ScheduleConfigurationProperty -> ShowS
[ScheduleConfigurationProperty] -> ShowS
ScheduleConfigurationProperty -> String
(Int -> ScheduleConfigurationProperty -> ShowS)
-> (ScheduleConfigurationProperty -> String)
-> ([ScheduleConfigurationProperty] -> ShowS)
-> Show ScheduleConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ScheduleConfigurationProperty -> ShowS
showsPrec :: Int -> ScheduleConfigurationProperty -> ShowS
$cshow :: ScheduleConfigurationProperty -> String
show :: ScheduleConfigurationProperty -> String
$cshowList :: [ScheduleConfigurationProperty] -> ShowS
showList :: [ScheduleConfigurationProperty] -> ShowS
Prelude.Show)
mkScheduleConfigurationProperty :: ScheduleConfigurationProperty
mkScheduleConfigurationProperty :: ScheduleConfigurationProperty
mkScheduleConfigurationProperty
  = ScheduleConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), schedule :: Maybe (Value Text)
schedule = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       timezone :: Maybe (Value Text)
timezone = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ScheduleConfigurationProperty where
  toResourceProperties :: ScheduleConfigurationProperty -> ResourceProperties
toResourceProperties ScheduleConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: ScheduleConfigurationProperty -> ()
schedule :: ScheduleConfigurationProperty -> Maybe (Value Text)
timezone :: ScheduleConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
schedule :: Maybe (Value Text)
timezone :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataZone::DataSource.ScheduleConfiguration",
         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
"Schedule" (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)
schedule,
                            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
"Timezone" (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)
timezone])}
instance JSON.ToJSON ScheduleConfigurationProperty where
  toJSON :: ScheduleConfigurationProperty -> Value
toJSON ScheduleConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: ScheduleConfigurationProperty -> ()
schedule :: ScheduleConfigurationProperty -> Maybe (Value Text)
timezone :: ScheduleConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
schedule :: Maybe (Value Text)
timezone :: 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
"Schedule" (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)
schedule,
               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
"Timezone" (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)
timezone]))
instance Property "Schedule" ScheduleConfigurationProperty where
  type PropertyType "Schedule" ScheduleConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Schedule" ScheduleConfigurationProperty
-> ScheduleConfigurationProperty -> ScheduleConfigurationProperty
set PropertyType "Schedule" ScheduleConfigurationProperty
newValue ScheduleConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: ScheduleConfigurationProperty -> ()
schedule :: ScheduleConfigurationProperty -> Maybe (Value Text)
timezone :: ScheduleConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
schedule :: Maybe (Value Text)
timezone :: Maybe (Value Text)
..}
    = ScheduleConfigurationProperty
        {schedule :: Maybe (Value Text)
schedule = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Schedule" ScheduleConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
timezone :: Maybe (Value Text)
haddock_workaround_ :: ()
timezone :: Maybe (Value Text)
..}
instance Property "Timezone" ScheduleConfigurationProperty where
  type PropertyType "Timezone" ScheduleConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Timezone" ScheduleConfigurationProperty
-> ScheduleConfigurationProperty -> ScheduleConfigurationProperty
set PropertyType "Timezone" ScheduleConfigurationProperty
newValue ScheduleConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: ScheduleConfigurationProperty -> ()
schedule :: ScheduleConfigurationProperty -> Maybe (Value Text)
timezone :: ScheduleConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
schedule :: Maybe (Value Text)
timezone :: Maybe (Value Text)
..}
    = ScheduleConfigurationProperty
        {timezone :: Maybe (Value Text)
timezone = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Timezone" ScheduleConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
schedule :: Maybe (Value Text)
haddock_workaround_ :: ()
schedule :: Maybe (Value Text)
..}