module Stratosphere.ConnectCampaignsV2.Campaign.CommunicationLimitProperty (
        CommunicationLimitProperty(..), mkCommunicationLimitProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CommunicationLimitProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaignsv2-campaign-communicationlimit.html>
    CommunicationLimitProperty {CommunicationLimitProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaignsv2-campaign-communicationlimit.html#cfn-connectcampaignsv2-campaign-communicationlimit-frequency>
                                CommunicationLimitProperty -> Value Integer
frequency :: (Value Prelude.Integer),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaignsv2-campaign-communicationlimit.html#cfn-connectcampaignsv2-campaign-communicationlimit-maxcountperrecipient>
                                CommunicationLimitProperty -> Value Integer
maxCountPerRecipient :: (Value Prelude.Integer),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connectcampaignsv2-campaign-communicationlimit.html#cfn-connectcampaignsv2-campaign-communicationlimit-unit>
                                CommunicationLimitProperty -> Value Text
unit :: (Value Prelude.Text)}
  deriving stock (CommunicationLimitProperty -> CommunicationLimitProperty -> Bool
(CommunicationLimitProperty -> CommunicationLimitProperty -> Bool)
-> (CommunicationLimitProperty
    -> CommunicationLimitProperty -> Bool)
-> Eq CommunicationLimitProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CommunicationLimitProperty -> CommunicationLimitProperty -> Bool
== :: CommunicationLimitProperty -> CommunicationLimitProperty -> Bool
$c/= :: CommunicationLimitProperty -> CommunicationLimitProperty -> Bool
/= :: CommunicationLimitProperty -> CommunicationLimitProperty -> Bool
Prelude.Eq, Int -> CommunicationLimitProperty -> ShowS
[CommunicationLimitProperty] -> ShowS
CommunicationLimitProperty -> String
(Int -> CommunicationLimitProperty -> ShowS)
-> (CommunicationLimitProperty -> String)
-> ([CommunicationLimitProperty] -> ShowS)
-> Show CommunicationLimitProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CommunicationLimitProperty -> ShowS
showsPrec :: Int -> CommunicationLimitProperty -> ShowS
$cshow :: CommunicationLimitProperty -> String
show :: CommunicationLimitProperty -> String
$cshowList :: [CommunicationLimitProperty] -> ShowS
showList :: [CommunicationLimitProperty] -> ShowS
Prelude.Show)
mkCommunicationLimitProperty ::
  Value Prelude.Integer
  -> Value Prelude.Integer
     -> Value Prelude.Text -> CommunicationLimitProperty
mkCommunicationLimitProperty :: Value Integer
-> Value Integer -> Value Text -> CommunicationLimitProperty
mkCommunicationLimitProperty Value Integer
frequency Value Integer
maxCountPerRecipient Value Text
unit
  = CommunicationLimitProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), frequency :: Value Integer
frequency = Value Integer
frequency,
       maxCountPerRecipient :: Value Integer
maxCountPerRecipient = Value Integer
maxCountPerRecipient, unit :: Value Text
unit = Value Text
unit}
instance ToResourceProperties CommunicationLimitProperty where
  toResourceProperties :: CommunicationLimitProperty -> ResourceProperties
toResourceProperties CommunicationLimitProperty {()
Value Integer
Value Text
haddock_workaround_ :: CommunicationLimitProperty -> ()
frequency :: CommunicationLimitProperty -> Value Integer
maxCountPerRecipient :: CommunicationLimitProperty -> Value Integer
unit :: CommunicationLimitProperty -> Value Text
haddock_workaround_ :: ()
frequency :: Value Integer
maxCountPerRecipient :: Value Integer
unit :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ConnectCampaignsV2::Campaign.CommunicationLimit",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"Frequency" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
frequency,
                       Key
"MaxCountPerRecipient" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
maxCountPerRecipient,
                       Key
"Unit" 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
unit]}
instance JSON.ToJSON CommunicationLimitProperty where
  toJSON :: CommunicationLimitProperty -> Value
toJSON CommunicationLimitProperty {()
Value Integer
Value Text
haddock_workaround_ :: CommunicationLimitProperty -> ()
frequency :: CommunicationLimitProperty -> Value Integer
maxCountPerRecipient :: CommunicationLimitProperty -> Value Integer
unit :: CommunicationLimitProperty -> Value Text
haddock_workaround_ :: ()
frequency :: Value Integer
maxCountPerRecipient :: Value Integer
unit :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        [Key
"Frequency" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
frequency,
         Key
"MaxCountPerRecipient" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
maxCountPerRecipient,
         Key
"Unit" 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
unit]
instance Property "Frequency" CommunicationLimitProperty where
  type PropertyType "Frequency" CommunicationLimitProperty = Value Prelude.Integer
  set :: PropertyType "Frequency" CommunicationLimitProperty
-> CommunicationLimitProperty -> CommunicationLimitProperty
set PropertyType "Frequency" CommunicationLimitProperty
newValue CommunicationLimitProperty {()
Value Integer
Value Text
haddock_workaround_ :: CommunicationLimitProperty -> ()
frequency :: CommunicationLimitProperty -> Value Integer
maxCountPerRecipient :: CommunicationLimitProperty -> Value Integer
unit :: CommunicationLimitProperty -> Value Text
haddock_workaround_ :: ()
frequency :: Value Integer
maxCountPerRecipient :: Value Integer
unit :: Value Text
..}
    = CommunicationLimitProperty {frequency :: Value Integer
frequency = PropertyType "Frequency" CommunicationLimitProperty
Value Integer
newValue, ()
Value Integer
Value Text
haddock_workaround_ :: ()
maxCountPerRecipient :: Value Integer
unit :: Value Text
haddock_workaround_ :: ()
maxCountPerRecipient :: Value Integer
unit :: Value Text
..}
instance Property "MaxCountPerRecipient" CommunicationLimitProperty where
  type PropertyType "MaxCountPerRecipient" CommunicationLimitProperty = Value Prelude.Integer
  set :: PropertyType "MaxCountPerRecipient" CommunicationLimitProperty
-> CommunicationLimitProperty -> CommunicationLimitProperty
set PropertyType "MaxCountPerRecipient" CommunicationLimitProperty
newValue CommunicationLimitProperty {()
Value Integer
Value Text
haddock_workaround_ :: CommunicationLimitProperty -> ()
frequency :: CommunicationLimitProperty -> Value Integer
maxCountPerRecipient :: CommunicationLimitProperty -> Value Integer
unit :: CommunicationLimitProperty -> Value Text
haddock_workaround_ :: ()
frequency :: Value Integer
maxCountPerRecipient :: Value Integer
unit :: Value Text
..}
    = CommunicationLimitProperty {maxCountPerRecipient :: Value Integer
maxCountPerRecipient = PropertyType "MaxCountPerRecipient" CommunicationLimitProperty
Value Integer
newValue, ()
Value Integer
Value Text
haddock_workaround_ :: ()
frequency :: Value Integer
unit :: Value Text
haddock_workaround_ :: ()
frequency :: Value Integer
unit :: Value Text
..}
instance Property "Unit" CommunicationLimitProperty where
  type PropertyType "Unit" CommunicationLimitProperty = Value Prelude.Text
  set :: PropertyType "Unit" CommunicationLimitProperty
-> CommunicationLimitProperty -> CommunicationLimitProperty
set PropertyType "Unit" CommunicationLimitProperty
newValue CommunicationLimitProperty {()
Value Integer
Value Text
haddock_workaround_ :: CommunicationLimitProperty -> ()
frequency :: CommunicationLimitProperty -> Value Integer
maxCountPerRecipient :: CommunicationLimitProperty -> Value Integer
unit :: CommunicationLimitProperty -> Value Text
haddock_workaround_ :: ()
frequency :: Value Integer
maxCountPerRecipient :: Value Integer
unit :: Value Text
..}
    = CommunicationLimitProperty {unit :: Value Text
unit = PropertyType "Unit" CommunicationLimitProperty
Value Text
newValue, ()
Value Integer
haddock_workaround_ :: ()
frequency :: Value Integer
maxCountPerRecipient :: Value Integer
haddock_workaround_ :: ()
frequency :: Value Integer
maxCountPerRecipient :: Value Integer
..}