module Stratosphere.IoTEvents.Input (
        module Exports, Input(..), mkInput
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoTEvents.Input.InputDefinitionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Input
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-input.html>
    Input {Input -> ()
haddock_workaround_ :: (),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-input.html#cfn-iotevents-input-inputdefinition>
           Input -> InputDefinitionProperty
inputDefinition :: InputDefinitionProperty,
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-input.html#cfn-iotevents-input-inputdescription>
           Input -> Maybe (Value Text)
inputDescription :: (Prelude.Maybe (Value Prelude.Text)),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-input.html#cfn-iotevents-input-inputname>
           Input -> Maybe (Value Text)
inputName :: (Prelude.Maybe (Value Prelude.Text)),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-input.html#cfn-iotevents-input-tags>
           Input -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (Input -> Input -> Bool
(Input -> Input -> Bool) -> (Input -> Input -> Bool) -> Eq Input
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Input -> Input -> Bool
== :: Input -> Input -> Bool
$c/= :: Input -> Input -> Bool
/= :: Input -> Input -> Bool
Prelude.Eq, Int -> Input -> ShowS
[Input] -> ShowS
Input -> String
(Int -> Input -> ShowS)
-> (Input -> String) -> ([Input] -> ShowS) -> Show Input
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Input -> ShowS
showsPrec :: Int -> Input -> ShowS
$cshow :: Input -> String
show :: Input -> String
$cshowList :: [Input] -> ShowS
showList :: [Input] -> ShowS
Prelude.Show)
mkInput :: InputDefinitionProperty -> Input
mkInput :: InputDefinitionProperty -> Input
mkInput InputDefinitionProperty
inputDefinition
  = Input
      {haddock_workaround_ :: ()
haddock_workaround_ = (), inputDefinition :: InputDefinitionProperty
inputDefinition = InputDefinitionProperty
inputDefinition,
       inputDescription :: Maybe (Value Text)
inputDescription = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, inputName :: Maybe (Value Text)
inputName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Input where
  toResourceProperties :: Input -> ResourceProperties
toResourceProperties Input {Maybe [Tag]
Maybe (Value Text)
()
InputDefinitionProperty
haddock_workaround_ :: Input -> ()
inputDefinition :: Input -> InputDefinitionProperty
inputDescription :: Input -> Maybe (Value Text)
inputName :: Input -> Maybe (Value Text)
tags :: Input -> Maybe [Tag]
haddock_workaround_ :: ()
inputDefinition :: InputDefinitionProperty
inputDescription :: Maybe (Value Text)
inputName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoTEvents::Input", 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
"InputDefinition" Key -> InputDefinitionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= InputDefinitionProperty
inputDefinition]
                           ([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
"InputDescription" (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)
inputDescription,
                               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
"InputName" (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)
inputName,
                               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 Input where
  toJSON :: Input -> Value
toJSON Input {Maybe [Tag]
Maybe (Value Text)
()
InputDefinitionProperty
haddock_workaround_ :: Input -> ()
inputDefinition :: Input -> InputDefinitionProperty
inputDescription :: Input -> Maybe (Value Text)
inputName :: Input -> Maybe (Value Text)
tags :: Input -> Maybe [Tag]
haddock_workaround_ :: ()
inputDefinition :: InputDefinitionProperty
inputDescription :: Maybe (Value Text)
inputName :: Maybe (Value Text)
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
"InputDefinition" Key -> InputDefinitionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= InputDefinitionProperty
inputDefinition]
              ([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
"InputDescription" (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)
inputDescription,
                  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
"InputName" (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)
inputName,
                  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 "InputDefinition" Input where
  type PropertyType "InputDefinition" Input = InputDefinitionProperty
  set :: PropertyType "InputDefinition" Input -> Input -> Input
set PropertyType "InputDefinition" Input
newValue Input {Maybe [Tag]
Maybe (Value Text)
()
InputDefinitionProperty
haddock_workaround_ :: Input -> ()
inputDefinition :: Input -> InputDefinitionProperty
inputDescription :: Input -> Maybe (Value Text)
inputName :: Input -> Maybe (Value Text)
tags :: Input -> Maybe [Tag]
haddock_workaround_ :: ()
inputDefinition :: InputDefinitionProperty
inputDescription :: Maybe (Value Text)
inputName :: Maybe (Value Text)
tags :: Maybe [Tag]
..} = Input {inputDefinition :: InputDefinitionProperty
inputDefinition = PropertyType "InputDefinition" Input
InputDefinitionProperty
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
inputDescription :: Maybe (Value Text)
inputName :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
inputDescription :: Maybe (Value Text)
inputName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "InputDescription" Input where
  type PropertyType "InputDescription" Input = Value Prelude.Text
  set :: PropertyType "InputDescription" Input -> Input -> Input
set PropertyType "InputDescription" Input
newValue Input {Maybe [Tag]
Maybe (Value Text)
()
InputDefinitionProperty
haddock_workaround_ :: Input -> ()
inputDefinition :: Input -> InputDefinitionProperty
inputDescription :: Input -> Maybe (Value Text)
inputName :: Input -> Maybe (Value Text)
tags :: Input -> Maybe [Tag]
haddock_workaround_ :: ()
inputDefinition :: InputDefinitionProperty
inputDescription :: Maybe (Value Text)
inputName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = Input {inputDescription :: Maybe (Value Text)
inputDescription = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InputDescription" Input
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
InputDefinitionProperty
haddock_workaround_ :: ()
inputDefinition :: InputDefinitionProperty
inputName :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
inputDefinition :: InputDefinitionProperty
inputName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "InputName" Input where
  type PropertyType "InputName" Input = Value Prelude.Text
  set :: PropertyType "InputName" Input -> Input -> Input
set PropertyType "InputName" Input
newValue Input {Maybe [Tag]
Maybe (Value Text)
()
InputDefinitionProperty
haddock_workaround_ :: Input -> ()
inputDefinition :: Input -> InputDefinitionProperty
inputDescription :: Input -> Maybe (Value Text)
inputName :: Input -> Maybe (Value Text)
tags :: Input -> Maybe [Tag]
haddock_workaround_ :: ()
inputDefinition :: InputDefinitionProperty
inputDescription :: Maybe (Value Text)
inputName :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = Input {inputName :: Maybe (Value Text)
inputName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InputName" Input
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
InputDefinitionProperty
haddock_workaround_ :: ()
inputDefinition :: InputDefinitionProperty
inputDescription :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
inputDefinition :: InputDefinitionProperty
inputDescription :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" Input where
  type PropertyType "Tags" Input = [Tag]
  set :: PropertyType "Tags" Input -> Input -> Input
set PropertyType "Tags" Input
newValue Input {Maybe [Tag]
Maybe (Value Text)
()
InputDefinitionProperty
haddock_workaround_ :: Input -> ()
inputDefinition :: Input -> InputDefinitionProperty
inputDescription :: Input -> Maybe (Value Text)
inputName :: Input -> Maybe (Value Text)
tags :: Input -> Maybe [Tag]
haddock_workaround_ :: ()
inputDefinition :: InputDefinitionProperty
inputDescription :: Maybe (Value Text)
inputName :: Maybe (Value Text)
tags :: Maybe [Tag]
..} = Input {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" Input
newValue, Maybe (Value Text)
()
InputDefinitionProperty
haddock_workaround_ :: ()
inputDefinition :: InputDefinitionProperty
inputDescription :: Maybe (Value Text)
inputName :: Maybe (Value Text)
haddock_workaround_ :: ()
inputDefinition :: InputDefinitionProperty
inputDescription :: Maybe (Value Text)
inputName :: Maybe (Value Text)
..}