module Stratosphere.ConnectCampaignsV2.Campaign.DailyHourProperty (
        module Exports, DailyHourProperty(..), mkDailyHourProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ConnectCampaignsV2.Campaign.TimeRangeProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DailyHourProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaignsv2-campaign-dailyhour.html>
    DailyHourProperty {DailyHourProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaignsv2-campaign-dailyhour.html#cfn-connectcampaignsv2-campaign-dailyhour-key>
                       DailyHourProperty -> Maybe (Value Text)
key :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaignsv2-campaign-dailyhour.html#cfn-connectcampaignsv2-campaign-dailyhour-value>
                       DailyHourProperty -> Maybe [TimeRangeProperty]
value :: (Prelude.Maybe [TimeRangeProperty])}
  deriving stock (DailyHourProperty -> DailyHourProperty -> Bool
(DailyHourProperty -> DailyHourProperty -> Bool)
-> (DailyHourProperty -> DailyHourProperty -> Bool)
-> Eq DailyHourProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DailyHourProperty -> DailyHourProperty -> Bool
== :: DailyHourProperty -> DailyHourProperty -> Bool
$c/= :: DailyHourProperty -> DailyHourProperty -> Bool
/= :: DailyHourProperty -> DailyHourProperty -> Bool
Prelude.Eq, Int -> DailyHourProperty -> ShowS
[DailyHourProperty] -> ShowS
DailyHourProperty -> String
(Int -> DailyHourProperty -> ShowS)
-> (DailyHourProperty -> String)
-> ([DailyHourProperty] -> ShowS)
-> Show DailyHourProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DailyHourProperty -> ShowS
showsPrec :: Int -> DailyHourProperty -> ShowS
$cshow :: DailyHourProperty -> String
show :: DailyHourProperty -> String
$cshowList :: [DailyHourProperty] -> ShowS
showList :: [DailyHourProperty] -> ShowS
Prelude.Show)
mkDailyHourProperty :: DailyHourProperty
mkDailyHourProperty :: DailyHourProperty
mkDailyHourProperty
  = DailyHourProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), key :: Maybe (Value Text)
key = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       value :: Maybe [TimeRangeProperty]
value = Maybe [TimeRangeProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DailyHourProperty where
  toResourceProperties :: DailyHourProperty -> ResourceProperties
toResourceProperties DailyHourProperty {Maybe [TimeRangeProperty]
Maybe (Value Text)
()
haddock_workaround_ :: DailyHourProperty -> ()
key :: DailyHourProperty -> Maybe (Value Text)
value :: DailyHourProperty -> Maybe [TimeRangeProperty]
haddock_workaround_ :: ()
key :: Maybe (Value Text)
value :: Maybe [TimeRangeProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ConnectCampaignsV2::Campaign.DailyHour",
         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
"Key" (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)
key,
                            Key -> [TimeRangeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Value" ([TimeRangeProperty] -> (Key, Value))
-> Maybe [TimeRangeProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TimeRangeProperty]
value])}
instance JSON.ToJSON DailyHourProperty where
  toJSON :: DailyHourProperty -> Value
toJSON DailyHourProperty {Maybe [TimeRangeProperty]
Maybe (Value Text)
()
haddock_workaround_ :: DailyHourProperty -> ()
key :: DailyHourProperty -> Maybe (Value Text)
value :: DailyHourProperty -> Maybe [TimeRangeProperty]
haddock_workaround_ :: ()
key :: Maybe (Value Text)
value :: Maybe [TimeRangeProperty]
..}
    = [(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
"Key" (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)
key,
               Key -> [TimeRangeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Value" ([TimeRangeProperty] -> (Key, Value))
-> Maybe [TimeRangeProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TimeRangeProperty]
value]))
instance Property "Key" DailyHourProperty where
  type PropertyType "Key" DailyHourProperty = Value Prelude.Text
  set :: PropertyType "Key" DailyHourProperty
-> DailyHourProperty -> DailyHourProperty
set PropertyType "Key" DailyHourProperty
newValue DailyHourProperty {Maybe [TimeRangeProperty]
Maybe (Value Text)
()
haddock_workaround_ :: DailyHourProperty -> ()
key :: DailyHourProperty -> Maybe (Value Text)
value :: DailyHourProperty -> Maybe [TimeRangeProperty]
haddock_workaround_ :: ()
key :: Maybe (Value Text)
value :: Maybe [TimeRangeProperty]
..}
    = DailyHourProperty {key :: Maybe (Value Text)
key = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Key" DailyHourProperty
Value Text
newValue, Maybe [TimeRangeProperty]
()
haddock_workaround_ :: ()
value :: Maybe [TimeRangeProperty]
haddock_workaround_ :: ()
value :: Maybe [TimeRangeProperty]
..}
instance Property "Value" DailyHourProperty where
  type PropertyType "Value" DailyHourProperty = [TimeRangeProperty]
  set :: PropertyType "Value" DailyHourProperty
-> DailyHourProperty -> DailyHourProperty
set PropertyType "Value" DailyHourProperty
newValue DailyHourProperty {Maybe [TimeRangeProperty]
Maybe (Value Text)
()
haddock_workaround_ :: DailyHourProperty -> ()
key :: DailyHourProperty -> Maybe (Value Text)
value :: DailyHourProperty -> Maybe [TimeRangeProperty]
haddock_workaround_ :: ()
key :: Maybe (Value Text)
value :: Maybe [TimeRangeProperty]
..}
    = DailyHourProperty {value :: Maybe [TimeRangeProperty]
value = [TimeRangeProperty] -> Maybe [TimeRangeProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TimeRangeProperty]
PropertyType "Value" DailyHourProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
key :: Maybe (Value Text)
haddock_workaround_ :: ()
key :: Maybe (Value Text)
..}