module Stratosphere.IoTAnalytics.Dataset.ActionProperty (
        module Exports, ActionProperty(..), mkActionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoTAnalytics.Dataset.ContainerActionProperty as Exports
import {-# SOURCE #-} Stratosphere.IoTAnalytics.Dataset.QueryActionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ActionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-action.html>
    ActionProperty {ActionProperty -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-action.html#cfn-iotanalytics-dataset-action-actionname>
                    ActionProperty -> Value Text
actionName :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-action.html#cfn-iotanalytics-dataset-action-containeraction>
                    ActionProperty -> Maybe ContainerActionProperty
containerAction :: (Prelude.Maybe ContainerActionProperty),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-action.html#cfn-iotanalytics-dataset-action-queryaction>
                    ActionProperty -> Maybe QueryActionProperty
queryAction :: (Prelude.Maybe QueryActionProperty)}
  deriving stock (ActionProperty -> ActionProperty -> Bool
(ActionProperty -> ActionProperty -> Bool)
-> (ActionProperty -> ActionProperty -> Bool) -> Eq ActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ActionProperty -> ActionProperty -> Bool
== :: ActionProperty -> ActionProperty -> Bool
$c/= :: ActionProperty -> ActionProperty -> Bool
/= :: ActionProperty -> ActionProperty -> Bool
Prelude.Eq, Int -> ActionProperty -> ShowS
[ActionProperty] -> ShowS
ActionProperty -> String
(Int -> ActionProperty -> ShowS)
-> (ActionProperty -> String)
-> ([ActionProperty] -> ShowS)
-> Show ActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ActionProperty -> ShowS
showsPrec :: Int -> ActionProperty -> ShowS
$cshow :: ActionProperty -> String
show :: ActionProperty -> String
$cshowList :: [ActionProperty] -> ShowS
showList :: [ActionProperty] -> ShowS
Prelude.Show)
mkActionProperty :: Value Prelude.Text -> ActionProperty
mkActionProperty :: Value Text -> ActionProperty
mkActionProperty Value Text
actionName
  = ActionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), actionName :: Value Text
actionName = Value Text
actionName,
       containerAction :: Maybe ContainerActionProperty
containerAction = Maybe ContainerActionProperty
forall a. Maybe a
Prelude.Nothing, queryAction :: Maybe QueryActionProperty
queryAction = Maybe QueryActionProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ActionProperty where
  toResourceProperties :: ActionProperty -> ResourceProperties
toResourceProperties ActionProperty {Maybe QueryActionProperty
Maybe ContainerActionProperty
()
Value Text
haddock_workaround_ :: ActionProperty -> ()
actionName :: ActionProperty -> Value Text
containerAction :: ActionProperty -> Maybe ContainerActionProperty
queryAction :: ActionProperty -> Maybe QueryActionProperty
haddock_workaround_ :: ()
actionName :: Value Text
containerAction :: Maybe ContainerActionProperty
queryAction :: Maybe QueryActionProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoTAnalytics::Dataset.Action",
         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
"ActionName" 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
actionName]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> ContainerActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ContainerAction" (ContainerActionProperty -> (Key, Value))
-> Maybe ContainerActionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ContainerActionProperty
containerAction,
                               Key -> QueryActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"QueryAction" (QueryActionProperty -> (Key, Value))
-> Maybe QueryActionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe QueryActionProperty
queryAction]))}
instance JSON.ToJSON ActionProperty where
  toJSON :: ActionProperty -> Value
toJSON ActionProperty {Maybe QueryActionProperty
Maybe ContainerActionProperty
()
Value Text
haddock_workaround_ :: ActionProperty -> ()
actionName :: ActionProperty -> Value Text
containerAction :: ActionProperty -> Maybe ContainerActionProperty
queryAction :: ActionProperty -> Maybe QueryActionProperty
haddock_workaround_ :: ()
actionName :: Value Text
containerAction :: Maybe ContainerActionProperty
queryAction :: Maybe QueryActionProperty
..}
    = [(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
"ActionName" 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
actionName]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> ContainerActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ContainerAction" (ContainerActionProperty -> (Key, Value))
-> Maybe ContainerActionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ContainerActionProperty
containerAction,
                  Key -> QueryActionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"QueryAction" (QueryActionProperty -> (Key, Value))
-> Maybe QueryActionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe QueryActionProperty
queryAction])))
instance Property "ActionName" ActionProperty where
  type PropertyType "ActionName" ActionProperty = Value Prelude.Text
  set :: PropertyType "ActionName" ActionProperty
-> ActionProperty -> ActionProperty
set PropertyType "ActionName" ActionProperty
newValue ActionProperty {Maybe QueryActionProperty
Maybe ContainerActionProperty
()
Value Text
haddock_workaround_ :: ActionProperty -> ()
actionName :: ActionProperty -> Value Text
containerAction :: ActionProperty -> Maybe ContainerActionProperty
queryAction :: ActionProperty -> Maybe QueryActionProperty
haddock_workaround_ :: ()
actionName :: Value Text
containerAction :: Maybe ContainerActionProperty
queryAction :: Maybe QueryActionProperty
..}
    = ActionProperty {actionName :: Value Text
actionName = PropertyType "ActionName" ActionProperty
Value Text
newValue, Maybe QueryActionProperty
Maybe ContainerActionProperty
()
haddock_workaround_ :: ()
containerAction :: Maybe ContainerActionProperty
queryAction :: Maybe QueryActionProperty
haddock_workaround_ :: ()
containerAction :: Maybe ContainerActionProperty
queryAction :: Maybe QueryActionProperty
..}
instance Property "ContainerAction" ActionProperty where
  type PropertyType "ContainerAction" ActionProperty = ContainerActionProperty
  set :: PropertyType "ContainerAction" ActionProperty
-> ActionProperty -> ActionProperty
set PropertyType "ContainerAction" ActionProperty
newValue ActionProperty {Maybe QueryActionProperty
Maybe ContainerActionProperty
()
Value Text
haddock_workaround_ :: ActionProperty -> ()
actionName :: ActionProperty -> Value Text
containerAction :: ActionProperty -> Maybe ContainerActionProperty
queryAction :: ActionProperty -> Maybe QueryActionProperty
haddock_workaround_ :: ()
actionName :: Value Text
containerAction :: Maybe ContainerActionProperty
queryAction :: Maybe QueryActionProperty
..}
    = ActionProperty {containerAction :: Maybe ContainerActionProperty
containerAction = ContainerActionProperty -> Maybe ContainerActionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContainerAction" ActionProperty
ContainerActionProperty
newValue, Maybe QueryActionProperty
()
Value Text
haddock_workaround_ :: ()
actionName :: Value Text
queryAction :: Maybe QueryActionProperty
haddock_workaround_ :: ()
actionName :: Value Text
queryAction :: Maybe QueryActionProperty
..}
instance Property "QueryAction" ActionProperty where
  type PropertyType "QueryAction" ActionProperty = QueryActionProperty
  set :: PropertyType "QueryAction" ActionProperty
-> ActionProperty -> ActionProperty
set PropertyType "QueryAction" ActionProperty
newValue ActionProperty {Maybe QueryActionProperty
Maybe ContainerActionProperty
()
Value Text
haddock_workaround_ :: ActionProperty -> ()
actionName :: ActionProperty -> Value Text
containerAction :: ActionProperty -> Maybe ContainerActionProperty
queryAction :: ActionProperty -> Maybe QueryActionProperty
haddock_workaround_ :: ()
actionName :: Value Text
containerAction :: Maybe ContainerActionProperty
queryAction :: Maybe QueryActionProperty
..}
    = ActionProperty {queryAction :: Maybe QueryActionProperty
queryAction = QueryActionProperty -> Maybe QueryActionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "QueryAction" ActionProperty
QueryActionProperty
newValue, Maybe ContainerActionProperty
()
Value Text
haddock_workaround_ :: ()
actionName :: Value Text
containerAction :: Maybe ContainerActionProperty
haddock_workaround_ :: ()
actionName :: Value Text
containerAction :: Maybe ContainerActionProperty
..}