module Stratosphere.IoT.TopicRule.KinesisActionProperty (
        KinesisActionProperty(..), mkKinesisActionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data KinesisActionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-kinesisaction.html>
    KinesisActionProperty {KinesisActionProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-kinesisaction.html#cfn-iot-topicrule-kinesisaction-partitionkey>
                           KinesisActionProperty -> Maybe (Value Text)
partitionKey :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-kinesisaction.html#cfn-iot-topicrule-kinesisaction-rolearn>
                           KinesisActionProperty -> Value Text
roleArn :: (Value Prelude.Text),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-kinesisaction.html#cfn-iot-topicrule-kinesisaction-streamname>
                           KinesisActionProperty -> Value Text
streamName :: (Value Prelude.Text)}
  deriving stock (KinesisActionProperty -> KinesisActionProperty -> Bool
(KinesisActionProperty -> KinesisActionProperty -> Bool)
-> (KinesisActionProperty -> KinesisActionProperty -> Bool)
-> Eq KinesisActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: KinesisActionProperty -> KinesisActionProperty -> Bool
== :: KinesisActionProperty -> KinesisActionProperty -> Bool
$c/= :: KinesisActionProperty -> KinesisActionProperty -> Bool
/= :: KinesisActionProperty -> KinesisActionProperty -> Bool
Prelude.Eq, Int -> KinesisActionProperty -> ShowS
[KinesisActionProperty] -> ShowS
KinesisActionProperty -> String
(Int -> KinesisActionProperty -> ShowS)
-> (KinesisActionProperty -> String)
-> ([KinesisActionProperty] -> ShowS)
-> Show KinesisActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> KinesisActionProperty -> ShowS
showsPrec :: Int -> KinesisActionProperty -> ShowS
$cshow :: KinesisActionProperty -> String
show :: KinesisActionProperty -> String
$cshowList :: [KinesisActionProperty] -> ShowS
showList :: [KinesisActionProperty] -> ShowS
Prelude.Show)
mkKinesisActionProperty ::
  Value Prelude.Text -> Value Prelude.Text -> KinesisActionProperty
mkKinesisActionProperty :: Value Text -> Value Text -> KinesisActionProperty
mkKinesisActionProperty Value Text
roleArn Value Text
streamName
  = KinesisActionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), roleArn :: Value Text
roleArn = Value Text
roleArn,
       streamName :: Value Text
streamName = Value Text
streamName, partitionKey :: Maybe (Value Text)
partitionKey = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties KinesisActionProperty where
  toResourceProperties :: KinesisActionProperty -> ResourceProperties
toResourceProperties KinesisActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: KinesisActionProperty -> ()
partitionKey :: KinesisActionProperty -> Maybe (Value Text)
roleArn :: KinesisActionProperty -> Value Text
streamName :: KinesisActionProperty -> Value Text
haddock_workaround_ :: ()
partitionKey :: Maybe (Value Text)
roleArn :: Value Text
streamName :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoT::TopicRule.KinesisAction",
         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
"RoleArn" 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
roleArn, Key
"StreamName" 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
streamName]
                           ([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
"PartitionKey" (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)
partitionKey]))}
instance JSON.ToJSON KinesisActionProperty where
  toJSON :: KinesisActionProperty -> Value
toJSON KinesisActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: KinesisActionProperty -> ()
partitionKey :: KinesisActionProperty -> Maybe (Value Text)
roleArn :: KinesisActionProperty -> Value Text
streamName :: KinesisActionProperty -> Value Text
haddock_workaround_ :: ()
partitionKey :: Maybe (Value Text)
roleArn :: Value Text
streamName :: Value Text
..}
    = [(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
"RoleArn" 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
roleArn, Key
"StreamName" 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
streamName]
              ([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
"PartitionKey" (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)
partitionKey])))
instance Property "PartitionKey" KinesisActionProperty where
  type PropertyType "PartitionKey" KinesisActionProperty = Value Prelude.Text
  set :: PropertyType "PartitionKey" KinesisActionProperty
-> KinesisActionProperty -> KinesisActionProperty
set PropertyType "PartitionKey" KinesisActionProperty
newValue KinesisActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: KinesisActionProperty -> ()
partitionKey :: KinesisActionProperty -> Maybe (Value Text)
roleArn :: KinesisActionProperty -> Value Text
streamName :: KinesisActionProperty -> Value Text
haddock_workaround_ :: ()
partitionKey :: Maybe (Value Text)
roleArn :: Value Text
streamName :: Value Text
..}
    = KinesisActionProperty {partitionKey :: Maybe (Value Text)
partitionKey = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PartitionKey" KinesisActionProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
roleArn :: Value Text
streamName :: Value Text
haddock_workaround_ :: ()
roleArn :: Value Text
streamName :: Value Text
..}
instance Property "RoleArn" KinesisActionProperty where
  type PropertyType "RoleArn" KinesisActionProperty = Value Prelude.Text
  set :: PropertyType "RoleArn" KinesisActionProperty
-> KinesisActionProperty -> KinesisActionProperty
set PropertyType "RoleArn" KinesisActionProperty
newValue KinesisActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: KinesisActionProperty -> ()
partitionKey :: KinesisActionProperty -> Maybe (Value Text)
roleArn :: KinesisActionProperty -> Value Text
streamName :: KinesisActionProperty -> Value Text
haddock_workaround_ :: ()
partitionKey :: Maybe (Value Text)
roleArn :: Value Text
streamName :: Value Text
..}
    = KinesisActionProperty {roleArn :: Value Text
roleArn = PropertyType "RoleArn" KinesisActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
partitionKey :: Maybe (Value Text)
streamName :: Value Text
haddock_workaround_ :: ()
partitionKey :: Maybe (Value Text)
streamName :: Value Text
..}
instance Property "StreamName" KinesisActionProperty where
  type PropertyType "StreamName" KinesisActionProperty = Value Prelude.Text
  set :: PropertyType "StreamName" KinesisActionProperty
-> KinesisActionProperty -> KinesisActionProperty
set PropertyType "StreamName" KinesisActionProperty
newValue KinesisActionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: KinesisActionProperty -> ()
partitionKey :: KinesisActionProperty -> Maybe (Value Text)
roleArn :: KinesisActionProperty -> Value Text
streamName :: KinesisActionProperty -> Value Text
haddock_workaround_ :: ()
partitionKey :: Maybe (Value Text)
roleArn :: Value Text
streamName :: Value Text
..}
    = KinesisActionProperty {streamName :: Value Text
streamName = PropertyType "StreamName" KinesisActionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
partitionKey :: Maybe (Value Text)
roleArn :: Value Text
haddock_workaround_ :: ()
partitionKey :: Maybe (Value Text)
roleArn :: Value Text
..}