module Stratosphere.ConnectCampaignsV2.Campaign.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
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaignsv2-campaign-schedule.html>
    ScheduleProperty {ScheduleProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaignsv2-campaign-schedule.html#cfn-connectcampaignsv2-campaign-schedule-endtime>
                      ScheduleProperty -> Value Text
endTime :: (Value Prelude.Text),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaignsv2-campaign-schedule.html#cfn-connectcampaignsv2-campaign-schedule-refreshfrequency>
                      ScheduleProperty -> Maybe (Value Text)
refreshFrequency :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaignsv2-campaign-schedule.html#cfn-connectcampaignsv2-campaign-schedule-starttime>
                      ScheduleProperty -> Value Text
startTime :: (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 ::
  Value Prelude.Text -> Value Prelude.Text -> ScheduleProperty
mkScheduleProperty :: Value Text -> Value Text -> ScheduleProperty
mkScheduleProperty Value Text
endTime Value Text
startTime
  = ScheduleProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), endTime :: Value Text
endTime = Value Text
endTime,
       startTime :: Value Text
startTime = Value Text
startTime, refreshFrequency :: Maybe (Value Text)
refreshFrequency = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ScheduleProperty where
  toResourceProperties :: ScheduleProperty -> ResourceProperties
toResourceProperties ScheduleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ScheduleProperty -> ()
endTime :: ScheduleProperty -> Value Text
refreshFrequency :: ScheduleProperty -> Maybe (Value Text)
startTime :: ScheduleProperty -> Value Text
haddock_workaround_ :: ()
endTime :: Value Text
refreshFrequency :: Maybe (Value Text)
startTime :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ConnectCampaignsV2::Campaign.Schedule",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"EndTime" 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..= Value Text
endTime, Key
"StartTime" 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..= Value Text
startTime]
                           ([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
"RefreshFrequency" (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)
refreshFrequency]))}
instance JSON.ToJSON ScheduleProperty where
  toJSON :: ScheduleProperty -> Value
toJSON ScheduleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ScheduleProperty -> ()
endTime :: ScheduleProperty -> Value Text
refreshFrequency :: ScheduleProperty -> Maybe (Value Text)
startTime :: ScheduleProperty -> Value Text
haddock_workaround_ :: ()
endTime :: Value Text
refreshFrequency :: Maybe (Value Text)
startTime :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"EndTime" 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..= Value Text
endTime, Key
"StartTime" 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..= Value Text
startTime]
              ([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
"RefreshFrequency" (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)
refreshFrequency])))
instance Property "EndTime" ScheduleProperty where
  type PropertyType "EndTime" ScheduleProperty = Value Prelude.Text
  set :: PropertyType "EndTime" ScheduleProperty
-> ScheduleProperty -> ScheduleProperty
set PropertyType "EndTime" ScheduleProperty
newValue ScheduleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ScheduleProperty -> ()
endTime :: ScheduleProperty -> Value Text
refreshFrequency :: ScheduleProperty -> Maybe (Value Text)
startTime :: ScheduleProperty -> Value Text
haddock_workaround_ :: ()
endTime :: Value Text
refreshFrequency :: Maybe (Value Text)
startTime :: Value Text
..}
    = ScheduleProperty {endTime :: Value Text
endTime = PropertyType "EndTime" ScheduleProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
refreshFrequency :: Maybe (Value Text)
startTime :: Value Text
haddock_workaround_ :: ()
refreshFrequency :: Maybe (Value Text)
startTime :: Value Text
..}
instance Property "RefreshFrequency" ScheduleProperty where
  type PropertyType "RefreshFrequency" ScheduleProperty = Value Prelude.Text
  set :: PropertyType "RefreshFrequency" ScheduleProperty
-> ScheduleProperty -> ScheduleProperty
set PropertyType "RefreshFrequency" ScheduleProperty
newValue ScheduleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ScheduleProperty -> ()
endTime :: ScheduleProperty -> Value Text
refreshFrequency :: ScheduleProperty -> Maybe (Value Text)
startTime :: ScheduleProperty -> Value Text
haddock_workaround_ :: ()
endTime :: Value Text
refreshFrequency :: Maybe (Value Text)
startTime :: Value Text
..}
    = ScheduleProperty {refreshFrequency :: Maybe (Value Text)
refreshFrequency = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RefreshFrequency" ScheduleProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
endTime :: Value Text
startTime :: Value Text
haddock_workaround_ :: ()
endTime :: Value Text
startTime :: Value Text
..}
instance Property "StartTime" ScheduleProperty where
  type PropertyType "StartTime" ScheduleProperty = Value Prelude.Text
  set :: PropertyType "StartTime" ScheduleProperty
-> ScheduleProperty -> ScheduleProperty
set PropertyType "StartTime" ScheduleProperty
newValue ScheduleProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ScheduleProperty -> ()
endTime :: ScheduleProperty -> Value Text
refreshFrequency :: ScheduleProperty -> Maybe (Value Text)
startTime :: ScheduleProperty -> Value Text
haddock_workaround_ :: ()
endTime :: Value Text
refreshFrequency :: Maybe (Value Text)
startTime :: Value Text
..}
    = ScheduleProperty {startTime :: Value Text
startTime = PropertyType "StartTime" ScheduleProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
endTime :: Value Text
refreshFrequency :: Maybe (Value Text)
haddock_workaround_ :: ()
endTime :: Value Text
refreshFrequency :: Maybe (Value Text)
..}