module Stratosphere.DataSync.Task.TaskScheduleProperty (
        TaskScheduleProperty(..), mkTaskScheduleProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TaskScheduleProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskschedule.html>
    TaskScheduleProperty {TaskScheduleProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskschedule.html#cfn-datasync-task-taskschedule-scheduleexpression>
                          TaskScheduleProperty -> Maybe (Value Text)
scheduleExpression :: (Prelude.Maybe (Value Prelude.Text)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-task-taskschedule.html#cfn-datasync-task-taskschedule-status>
                          TaskScheduleProperty -> Maybe (Value Text)
status :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (TaskScheduleProperty -> TaskScheduleProperty -> Bool
(TaskScheduleProperty -> TaskScheduleProperty -> Bool)
-> (TaskScheduleProperty -> TaskScheduleProperty -> Bool)
-> Eq TaskScheduleProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TaskScheduleProperty -> TaskScheduleProperty -> Bool
== :: TaskScheduleProperty -> TaskScheduleProperty -> Bool
$c/= :: TaskScheduleProperty -> TaskScheduleProperty -> Bool
/= :: TaskScheduleProperty -> TaskScheduleProperty -> Bool
Prelude.Eq, Int -> TaskScheduleProperty -> ShowS
[TaskScheduleProperty] -> ShowS
TaskScheduleProperty -> String
(Int -> TaskScheduleProperty -> ShowS)
-> (TaskScheduleProperty -> String)
-> ([TaskScheduleProperty] -> ShowS)
-> Show TaskScheduleProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TaskScheduleProperty -> ShowS
showsPrec :: Int -> TaskScheduleProperty -> ShowS
$cshow :: TaskScheduleProperty -> String
show :: TaskScheduleProperty -> String
$cshowList :: [TaskScheduleProperty] -> ShowS
showList :: [TaskScheduleProperty] -> ShowS
Prelude.Show)
mkTaskScheduleProperty :: TaskScheduleProperty
mkTaskScheduleProperty :: TaskScheduleProperty
mkTaskScheduleProperty
  = TaskScheduleProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), scheduleExpression :: Maybe (Value Text)
scheduleExpression = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       status :: Maybe (Value Text)
status = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TaskScheduleProperty where
  toResourceProperties :: TaskScheduleProperty -> ResourceProperties
toResourceProperties TaskScheduleProperty {Maybe (Value Text)
()
haddock_workaround_ :: TaskScheduleProperty -> ()
scheduleExpression :: TaskScheduleProperty -> Maybe (Value Text)
status :: TaskScheduleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
scheduleExpression :: Maybe (Value Text)
status :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataSync::Task.TaskSchedule",
         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,
                            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
"Status" (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)
status])}
instance JSON.ToJSON TaskScheduleProperty where
  toJSON :: TaskScheduleProperty -> Value
toJSON TaskScheduleProperty {Maybe (Value Text)
()
haddock_workaround_ :: TaskScheduleProperty -> ()
scheduleExpression :: TaskScheduleProperty -> Maybe (Value Text)
status :: TaskScheduleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
scheduleExpression :: Maybe (Value Text)
status :: 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,
               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
"Status" (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)
status]))
instance Property "ScheduleExpression" TaskScheduleProperty where
  type PropertyType "ScheduleExpression" TaskScheduleProperty = Value Prelude.Text
  set :: PropertyType "ScheduleExpression" TaskScheduleProperty
-> TaskScheduleProperty -> TaskScheduleProperty
set PropertyType "ScheduleExpression" TaskScheduleProperty
newValue TaskScheduleProperty {Maybe (Value Text)
()
haddock_workaround_ :: TaskScheduleProperty -> ()
scheduleExpression :: TaskScheduleProperty -> Maybe (Value Text)
status :: TaskScheduleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
scheduleExpression :: Maybe (Value Text)
status :: Maybe (Value Text)
..}
    = TaskScheduleProperty
        {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" TaskScheduleProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
status :: Maybe (Value Text)
haddock_workaround_ :: ()
status :: Maybe (Value Text)
..}
instance Property "Status" TaskScheduleProperty where
  type PropertyType "Status" TaskScheduleProperty = Value Prelude.Text
  set :: PropertyType "Status" TaskScheduleProperty
-> TaskScheduleProperty -> TaskScheduleProperty
set PropertyType "Status" TaskScheduleProperty
newValue TaskScheduleProperty {Maybe (Value Text)
()
haddock_workaround_ :: TaskScheduleProperty -> ()
scheduleExpression :: TaskScheduleProperty -> Maybe (Value Text)
status :: TaskScheduleProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
scheduleExpression :: Maybe (Value Text)
status :: Maybe (Value Text)
..}
    = TaskScheduleProperty {status :: Maybe (Value Text)
status = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Status" TaskScheduleProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
scheduleExpression :: Maybe (Value Text)
haddock_workaround_ :: ()
scheduleExpression :: Maybe (Value Text)
..}