module Stratosphere.Connect.Rule.TaskActionProperty (
        module Exports, TaskActionProperty(..), mkTaskActionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Connect.Rule.ReferenceProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TaskActionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-rule-taskaction.html>
    TaskActionProperty {TaskActionProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-rule-taskaction.html#cfn-connect-rule-taskaction-contactflowarn>
                        TaskActionProperty -> Value Text
contactFlowArn :: (Value Prelude.Text),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-rule-taskaction.html#cfn-connect-rule-taskaction-description>
                        TaskActionProperty -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-rule-taskaction.html#cfn-connect-rule-taskaction-name>
                        TaskActionProperty -> Value Text
name :: (Value Prelude.Text),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-rule-taskaction.html#cfn-connect-rule-taskaction-references>
                        TaskActionProperty -> Maybe (Map Text ReferenceProperty)
references :: (Prelude.Maybe (Prelude.Map Prelude.Text ReferenceProperty))}
  deriving stock (TaskActionProperty -> TaskActionProperty -> Bool
(TaskActionProperty -> TaskActionProperty -> Bool)
-> (TaskActionProperty -> TaskActionProperty -> Bool)
-> Eq TaskActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TaskActionProperty -> TaskActionProperty -> Bool
== :: TaskActionProperty -> TaskActionProperty -> Bool
$c/= :: TaskActionProperty -> TaskActionProperty -> Bool
/= :: TaskActionProperty -> TaskActionProperty -> Bool
Prelude.Eq, Int -> TaskActionProperty -> ShowS
[TaskActionProperty] -> ShowS
TaskActionProperty -> String
(Int -> TaskActionProperty -> ShowS)
-> (TaskActionProperty -> String)
-> ([TaskActionProperty] -> ShowS)
-> Show TaskActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TaskActionProperty -> ShowS
showsPrec :: Int -> TaskActionProperty -> ShowS
$cshow :: TaskActionProperty -> String
show :: TaskActionProperty -> String
$cshowList :: [TaskActionProperty] -> ShowS
showList :: [TaskActionProperty] -> ShowS
Prelude.Show)
mkTaskActionProperty ::
  Value Prelude.Text -> Value Prelude.Text -> TaskActionProperty
mkTaskActionProperty :: Value Text -> Value Text -> TaskActionProperty
mkTaskActionProperty Value Text
contactFlowArn Value Text
name
  = TaskActionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), contactFlowArn :: Value Text
contactFlowArn = Value Text
contactFlowArn,
       name :: Value Text
name = Value Text
name, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       references :: Maybe (Map Text ReferenceProperty)
references = Maybe (Map Text ReferenceProperty)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TaskActionProperty where
  toResourceProperties :: TaskActionProperty -> ResourceProperties
toResourceProperties TaskActionProperty {Maybe (Map Text ReferenceProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TaskActionProperty -> ()
contactFlowArn :: TaskActionProperty -> Value Text
description :: TaskActionProperty -> Maybe (Value Text)
name :: TaskActionProperty -> Value Text
references :: TaskActionProperty -> Maybe (Map Text ReferenceProperty)
haddock_workaround_ :: ()
contactFlowArn :: Value Text
description :: Maybe (Value Text)
name :: Value Text
references :: Maybe (Map Text ReferenceProperty)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Connect::Rule.TaskAction",
         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
"ContactFlowArn" 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
contactFlowArn, 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]
                           ([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
"Description" (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)
description,
                               Key -> Map Text ReferenceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"References" (Map Text ReferenceProperty -> (Key, Value))
-> Maybe (Map Text ReferenceProperty) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text ReferenceProperty)
references]))}
instance JSON.ToJSON TaskActionProperty where
  toJSON :: TaskActionProperty -> Value
toJSON TaskActionProperty {Maybe (Map Text ReferenceProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TaskActionProperty -> ()
contactFlowArn :: TaskActionProperty -> Value Text
description :: TaskActionProperty -> Maybe (Value Text)
name :: TaskActionProperty -> Value Text
references :: TaskActionProperty -> Maybe (Map Text ReferenceProperty)
haddock_workaround_ :: ()
contactFlowArn :: Value Text
description :: Maybe (Value Text)
name :: Value Text
references :: Maybe (Map Text ReferenceProperty)
..}
    = [(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
"ContactFlowArn" 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
contactFlowArn, 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]
              ([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
"Description" (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)
description,
                  Key -> Map Text ReferenceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"References" (Map Text ReferenceProperty -> (Key, Value))
-> Maybe (Map Text ReferenceProperty) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text ReferenceProperty)
references])))
instance Property "ContactFlowArn" TaskActionProperty where
  type PropertyType "ContactFlowArn" TaskActionProperty = Value Prelude.Text
  set :: PropertyType "ContactFlowArn" TaskActionProperty
-> TaskActionProperty -> TaskActionProperty
set PropertyType "ContactFlowArn" TaskActionProperty
newValue TaskActionProperty {Maybe (Map Text ReferenceProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TaskActionProperty -> ()
contactFlowArn :: TaskActionProperty -> Value Text
description :: TaskActionProperty -> Maybe (Value Text)
name :: TaskActionProperty -> Value Text
references :: TaskActionProperty -> Maybe (Map Text ReferenceProperty)
haddock_workaround_ :: ()
contactFlowArn :: Value Text
description :: Maybe (Value Text)
name :: Value Text
references :: Maybe (Map Text ReferenceProperty)
..}
    = TaskActionProperty {contactFlowArn :: Value Text
contactFlowArn = PropertyType "ContactFlowArn" TaskActionProperty
Value Text
newValue, Maybe (Map Text ReferenceProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
references :: Maybe (Map Text ReferenceProperty)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
references :: Maybe (Map Text ReferenceProperty)
..}
instance Property "Description" TaskActionProperty where
  type PropertyType "Description" TaskActionProperty = Value Prelude.Text
  set :: PropertyType "Description" TaskActionProperty
-> TaskActionProperty -> TaskActionProperty
set PropertyType "Description" TaskActionProperty
newValue TaskActionProperty {Maybe (Map Text ReferenceProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TaskActionProperty -> ()
contactFlowArn :: TaskActionProperty -> Value Text
description :: TaskActionProperty -> Maybe (Value Text)
name :: TaskActionProperty -> Value Text
references :: TaskActionProperty -> Maybe (Map Text ReferenceProperty)
haddock_workaround_ :: ()
contactFlowArn :: Value Text
description :: Maybe (Value Text)
name :: Value Text
references :: Maybe (Map Text ReferenceProperty)
..}
    = TaskActionProperty {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" TaskActionProperty
Value Text
newValue, Maybe (Map Text ReferenceProperty)
()
Value Text
haddock_workaround_ :: ()
contactFlowArn :: Value Text
name :: Value Text
references :: Maybe (Map Text ReferenceProperty)
haddock_workaround_ :: ()
contactFlowArn :: Value Text
name :: Value Text
references :: Maybe (Map Text ReferenceProperty)
..}
instance Property "Name" TaskActionProperty where
  type PropertyType "Name" TaskActionProperty = Value Prelude.Text
  set :: PropertyType "Name" TaskActionProperty
-> TaskActionProperty -> TaskActionProperty
set PropertyType "Name" TaskActionProperty
newValue TaskActionProperty {Maybe (Map Text ReferenceProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TaskActionProperty -> ()
contactFlowArn :: TaskActionProperty -> Value Text
description :: TaskActionProperty -> Maybe (Value Text)
name :: TaskActionProperty -> Value Text
references :: TaskActionProperty -> Maybe (Map Text ReferenceProperty)
haddock_workaround_ :: ()
contactFlowArn :: Value Text
description :: Maybe (Value Text)
name :: Value Text
references :: Maybe (Map Text ReferenceProperty)
..}
    = TaskActionProperty {name :: Value Text
name = PropertyType "Name" TaskActionProperty
Value Text
newValue, Maybe (Map Text ReferenceProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
contactFlowArn :: Value Text
description :: Maybe (Value Text)
references :: Maybe (Map Text ReferenceProperty)
haddock_workaround_ :: ()
contactFlowArn :: Value Text
description :: Maybe (Value Text)
references :: Maybe (Map Text ReferenceProperty)
..}
instance Property "References" TaskActionProperty where
  type PropertyType "References" TaskActionProperty = Prelude.Map Prelude.Text ReferenceProperty
  set :: PropertyType "References" TaskActionProperty
-> TaskActionProperty -> TaskActionProperty
set PropertyType "References" TaskActionProperty
newValue TaskActionProperty {Maybe (Map Text ReferenceProperty)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: TaskActionProperty -> ()
contactFlowArn :: TaskActionProperty -> Value Text
description :: TaskActionProperty -> Maybe (Value Text)
name :: TaskActionProperty -> Value Text
references :: TaskActionProperty -> Maybe (Map Text ReferenceProperty)
haddock_workaround_ :: ()
contactFlowArn :: Value Text
description :: Maybe (Value Text)
name :: Value Text
references :: Maybe (Map Text ReferenceProperty)
..}
    = TaskActionProperty {references :: Maybe (Map Text ReferenceProperty)
references = Map Text ReferenceProperty -> Maybe (Map Text ReferenceProperty)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text ReferenceProperty
PropertyType "References" TaskActionProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
contactFlowArn :: Value Text
description :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
contactFlowArn :: Value Text
description :: Maybe (Value Text)
name :: Value Text
..}