module Stratosphere.ConnectCampaigns.Campaign (
        module Exports, Campaign(..), mkCampaign
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ConnectCampaigns.Campaign.DialerConfigProperty as Exports
import {-# SOURCE #-} Stratosphere.ConnectCampaigns.Campaign.OutboundCallConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Campaign
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connectcampaigns-campaign.html>
    Campaign {Campaign -> ()
haddock_workaround_ :: (),
              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connectcampaigns-campaign.html#cfn-connectcampaigns-campaign-connectinstancearn>
              Campaign -> Value Text
connectInstanceArn :: (Value Prelude.Text),
              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connectcampaigns-campaign.html#cfn-connectcampaigns-campaign-dialerconfig>
              Campaign -> DialerConfigProperty
dialerConfig :: DialerConfigProperty,
              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connectcampaigns-campaign.html#cfn-connectcampaigns-campaign-name>
              Campaign -> Value Text
name :: (Value Prelude.Text),
              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connectcampaigns-campaign.html#cfn-connectcampaigns-campaign-outboundcallconfig>
              Campaign -> OutboundCallConfigProperty
outboundCallConfig :: OutboundCallConfigProperty,
              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connectcampaigns-campaign.html#cfn-connectcampaigns-campaign-tags>
              Campaign -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (Campaign -> Campaign -> Bool
(Campaign -> Campaign -> Bool)
-> (Campaign -> Campaign -> Bool) -> Eq Campaign
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Campaign -> Campaign -> Bool
== :: Campaign -> Campaign -> Bool
$c/= :: Campaign -> Campaign -> Bool
/= :: Campaign -> Campaign -> Bool
Prelude.Eq, Int -> Campaign -> ShowS
[Campaign] -> ShowS
Campaign -> String
(Int -> Campaign -> ShowS)
-> (Campaign -> String) -> ([Campaign] -> ShowS) -> Show Campaign
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Campaign -> ShowS
showsPrec :: Int -> Campaign -> ShowS
$cshow :: Campaign -> String
show :: Campaign -> String
$cshowList :: [Campaign] -> ShowS
showList :: [Campaign] -> ShowS
Prelude.Show)
mkCampaign ::
  Value Prelude.Text
  -> DialerConfigProperty
     -> Value Prelude.Text -> OutboundCallConfigProperty -> Campaign
mkCampaign :: Value Text
-> DialerConfigProperty
-> Value Text
-> OutboundCallConfigProperty
-> Campaign
mkCampaign Value Text
connectInstanceArn DialerConfigProperty
dialerConfig Value Text
name OutboundCallConfigProperty
outboundCallConfig
  = Campaign
      {haddock_workaround_ :: ()
haddock_workaround_ = (), connectInstanceArn :: Value Text
connectInstanceArn = Value Text
connectInstanceArn,
       dialerConfig :: DialerConfigProperty
dialerConfig = DialerConfigProperty
dialerConfig, name :: Value Text
name = Value Text
name,
       outboundCallConfig :: OutboundCallConfigProperty
outboundCallConfig = OutboundCallConfigProperty
outboundCallConfig, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Campaign where
  toResourceProperties :: Campaign -> ResourceProperties
toResourceProperties Campaign {Maybe [Tag]
()
Value Text
OutboundCallConfigProperty
DialerConfigProperty
haddock_workaround_ :: Campaign -> ()
connectInstanceArn :: Campaign -> Value Text
dialerConfig :: Campaign -> DialerConfigProperty
name :: Campaign -> Value Text
outboundCallConfig :: Campaign -> OutboundCallConfigProperty
tags :: Campaign -> Maybe [Tag]
haddock_workaround_ :: ()
connectInstanceArn :: Value Text
dialerConfig :: DialerConfigProperty
name :: Value Text
outboundCallConfig :: OutboundCallConfigProperty
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ConnectCampaigns::Campaign",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"ConnectInstanceArn" 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
connectInstanceArn,
                            Key
"DialerConfig" Key -> DialerConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= DialerConfigProperty
dialerConfig, Key
"Name" 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
name,
                            Key
"OutboundCallConfig" Key -> OutboundCallConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= OutboundCallConfigProperty
outboundCallConfig]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON Campaign where
  toJSON :: Campaign -> Value
toJSON Campaign {Maybe [Tag]
()
Value Text
OutboundCallConfigProperty
DialerConfigProperty
haddock_workaround_ :: Campaign -> ()
connectInstanceArn :: Campaign -> Value Text
dialerConfig :: Campaign -> DialerConfigProperty
name :: Campaign -> Value Text
outboundCallConfig :: Campaign -> OutboundCallConfigProperty
tags :: Campaign -> Maybe [Tag]
haddock_workaround_ :: ()
connectInstanceArn :: Value Text
dialerConfig :: DialerConfigProperty
name :: Value Text
outboundCallConfig :: OutboundCallConfigProperty
tags :: Maybe [Tag]
..}
    = [(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
"ConnectInstanceArn" 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
connectInstanceArn,
               Key
"DialerConfig" Key -> DialerConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= DialerConfigProperty
dialerConfig, Key
"Name" 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
name,
               Key
"OutboundCallConfig" Key -> OutboundCallConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= OutboundCallConfigProperty
outboundCallConfig]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "ConnectInstanceArn" Campaign where
  type PropertyType "ConnectInstanceArn" Campaign = Value Prelude.Text
  set :: PropertyType "ConnectInstanceArn" Campaign -> Campaign -> Campaign
set PropertyType "ConnectInstanceArn" Campaign
newValue Campaign {Maybe [Tag]
()
Value Text
OutboundCallConfigProperty
DialerConfigProperty
haddock_workaround_ :: Campaign -> ()
connectInstanceArn :: Campaign -> Value Text
dialerConfig :: Campaign -> DialerConfigProperty
name :: Campaign -> Value Text
outboundCallConfig :: Campaign -> OutboundCallConfigProperty
tags :: Campaign -> Maybe [Tag]
haddock_workaround_ :: ()
connectInstanceArn :: Value Text
dialerConfig :: DialerConfigProperty
name :: Value Text
outboundCallConfig :: OutboundCallConfigProperty
tags :: Maybe [Tag]
..}
    = Campaign {connectInstanceArn :: Value Text
connectInstanceArn = PropertyType "ConnectInstanceArn" Campaign
Value Text
newValue, Maybe [Tag]
()
Value Text
OutboundCallConfigProperty
DialerConfigProperty
haddock_workaround_ :: ()
dialerConfig :: DialerConfigProperty
name :: Value Text
outboundCallConfig :: OutboundCallConfigProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
dialerConfig :: DialerConfigProperty
name :: Value Text
outboundCallConfig :: OutboundCallConfigProperty
tags :: Maybe [Tag]
..}
instance Property "DialerConfig" Campaign where
  type PropertyType "DialerConfig" Campaign = DialerConfigProperty
  set :: PropertyType "DialerConfig" Campaign -> Campaign -> Campaign
set PropertyType "DialerConfig" Campaign
newValue Campaign {Maybe [Tag]
()
Value Text
OutboundCallConfigProperty
DialerConfigProperty
haddock_workaround_ :: Campaign -> ()
connectInstanceArn :: Campaign -> Value Text
dialerConfig :: Campaign -> DialerConfigProperty
name :: Campaign -> Value Text
outboundCallConfig :: Campaign -> OutboundCallConfigProperty
tags :: Campaign -> Maybe [Tag]
haddock_workaround_ :: ()
connectInstanceArn :: Value Text
dialerConfig :: DialerConfigProperty
name :: Value Text
outboundCallConfig :: OutboundCallConfigProperty
tags :: Maybe [Tag]
..} = Campaign {dialerConfig :: DialerConfigProperty
dialerConfig = PropertyType "DialerConfig" Campaign
DialerConfigProperty
newValue, Maybe [Tag]
()
Value Text
OutboundCallConfigProperty
haddock_workaround_ :: ()
connectInstanceArn :: Value Text
name :: Value Text
outboundCallConfig :: OutboundCallConfigProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
connectInstanceArn :: Value Text
name :: Value Text
outboundCallConfig :: OutboundCallConfigProperty
tags :: Maybe [Tag]
..}
instance Property "Name" Campaign where
  type PropertyType "Name" Campaign = Value Prelude.Text
  set :: PropertyType "Name" Campaign -> Campaign -> Campaign
set PropertyType "Name" Campaign
newValue Campaign {Maybe [Tag]
()
Value Text
OutboundCallConfigProperty
DialerConfigProperty
haddock_workaround_ :: Campaign -> ()
connectInstanceArn :: Campaign -> Value Text
dialerConfig :: Campaign -> DialerConfigProperty
name :: Campaign -> Value Text
outboundCallConfig :: Campaign -> OutboundCallConfigProperty
tags :: Campaign -> Maybe [Tag]
haddock_workaround_ :: ()
connectInstanceArn :: Value Text
dialerConfig :: DialerConfigProperty
name :: Value Text
outboundCallConfig :: OutboundCallConfigProperty
tags :: Maybe [Tag]
..} = Campaign {name :: Value Text
name = PropertyType "Name" Campaign
Value Text
newValue, Maybe [Tag]
()
Value Text
OutboundCallConfigProperty
DialerConfigProperty
haddock_workaround_ :: ()
connectInstanceArn :: Value Text
dialerConfig :: DialerConfigProperty
outboundCallConfig :: OutboundCallConfigProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
connectInstanceArn :: Value Text
dialerConfig :: DialerConfigProperty
outboundCallConfig :: OutboundCallConfigProperty
tags :: Maybe [Tag]
..}
instance Property "OutboundCallConfig" Campaign where
  type PropertyType "OutboundCallConfig" Campaign = OutboundCallConfigProperty
  set :: PropertyType "OutboundCallConfig" Campaign -> Campaign -> Campaign
set PropertyType "OutboundCallConfig" Campaign
newValue Campaign {Maybe [Tag]
()
Value Text
OutboundCallConfigProperty
DialerConfigProperty
haddock_workaround_ :: Campaign -> ()
connectInstanceArn :: Campaign -> Value Text
dialerConfig :: Campaign -> DialerConfigProperty
name :: Campaign -> Value Text
outboundCallConfig :: Campaign -> OutboundCallConfigProperty
tags :: Campaign -> Maybe [Tag]
haddock_workaround_ :: ()
connectInstanceArn :: Value Text
dialerConfig :: DialerConfigProperty
name :: Value Text
outboundCallConfig :: OutboundCallConfigProperty
tags :: Maybe [Tag]
..}
    = Campaign {outboundCallConfig :: OutboundCallConfigProperty
outboundCallConfig = PropertyType "OutboundCallConfig" Campaign
OutboundCallConfigProperty
newValue, Maybe [Tag]
()
Value Text
DialerConfigProperty
haddock_workaround_ :: ()
connectInstanceArn :: Value Text
dialerConfig :: DialerConfigProperty
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
connectInstanceArn :: Value Text
dialerConfig :: DialerConfigProperty
name :: Value Text
tags :: Maybe [Tag]
..}
instance Property "Tags" Campaign where
  type PropertyType "Tags" Campaign = [Tag]
  set :: PropertyType "Tags" Campaign -> Campaign -> Campaign
set PropertyType "Tags" Campaign
newValue Campaign {Maybe [Tag]
()
Value Text
OutboundCallConfigProperty
DialerConfigProperty
haddock_workaround_ :: Campaign -> ()
connectInstanceArn :: Campaign -> Value Text
dialerConfig :: Campaign -> DialerConfigProperty
name :: Campaign -> Value Text
outboundCallConfig :: Campaign -> OutboundCallConfigProperty
tags :: Campaign -> Maybe [Tag]
haddock_workaround_ :: ()
connectInstanceArn :: Value Text
dialerConfig :: DialerConfigProperty
name :: Value Text
outboundCallConfig :: OutboundCallConfigProperty
tags :: Maybe [Tag]
..}
    = Campaign {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Campaign
newValue, ()
Value Text
OutboundCallConfigProperty
DialerConfigProperty
haddock_workaround_ :: ()
connectInstanceArn :: Value Text
dialerConfig :: DialerConfigProperty
name :: Value Text
outboundCallConfig :: OutboundCallConfigProperty
haddock_workaround_ :: ()
connectInstanceArn :: Value Text
dialerConfig :: DialerConfigProperty
name :: Value Text
outboundCallConfig :: OutboundCallConfigProperty
..}