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