module Stratosphere.IoT.TopicRule.FirehoseActionProperty (
        FirehoseActionProperty(..), mkFirehoseActionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FirehoseActionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-firehoseaction.html>
    FirehoseActionProperty {FirehoseActionProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-firehoseaction.html#cfn-iot-topicrule-firehoseaction-batchmode>
                            FirehoseActionProperty -> Maybe (Value Bool)
batchMode :: (Prelude.Maybe (Value Prelude.Bool)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-firehoseaction.html#cfn-iot-topicrule-firehoseaction-deliverystreamname>
                            FirehoseActionProperty -> Value Text
deliveryStreamName :: (Value Prelude.Text),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-firehoseaction.html#cfn-iot-topicrule-firehoseaction-rolearn>
                            FirehoseActionProperty -> Value Text
roleArn :: (Value Prelude.Text),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-firehoseaction.html#cfn-iot-topicrule-firehoseaction-separator>
                            FirehoseActionProperty -> Maybe (Value Text)
separator :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (FirehoseActionProperty -> FirehoseActionProperty -> Bool
(FirehoseActionProperty -> FirehoseActionProperty -> Bool)
-> (FirehoseActionProperty -> FirehoseActionProperty -> Bool)
-> Eq FirehoseActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FirehoseActionProperty -> FirehoseActionProperty -> Bool
== :: FirehoseActionProperty -> FirehoseActionProperty -> Bool
$c/= :: FirehoseActionProperty -> FirehoseActionProperty -> Bool
/= :: FirehoseActionProperty -> FirehoseActionProperty -> Bool
Prelude.Eq, Int -> FirehoseActionProperty -> ShowS
[FirehoseActionProperty] -> ShowS
FirehoseActionProperty -> String
(Int -> FirehoseActionProperty -> ShowS)
-> (FirehoseActionProperty -> String)
-> ([FirehoseActionProperty] -> ShowS)
-> Show FirehoseActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FirehoseActionProperty -> ShowS
showsPrec :: Int -> FirehoseActionProperty -> ShowS
$cshow :: FirehoseActionProperty -> String
show :: FirehoseActionProperty -> String
$cshowList :: [FirehoseActionProperty] -> ShowS
showList :: [FirehoseActionProperty] -> ShowS
Prelude.Show)
mkFirehoseActionProperty ::
  Value Prelude.Text -> Value Prelude.Text -> FirehoseActionProperty
mkFirehoseActionProperty :: Value Text -> Value Text -> FirehoseActionProperty
mkFirehoseActionProperty Value Text
deliveryStreamName Value Text
roleArn
  = FirehoseActionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), deliveryStreamName :: Value Text
deliveryStreamName = Value Text
deliveryStreamName,
       roleArn :: Value Text
roleArn = Value Text
roleArn, batchMode :: Maybe (Value Bool)
batchMode = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       separator :: Maybe (Value Text)
separator = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FirehoseActionProperty where
  toResourceProperties :: FirehoseActionProperty -> ResourceProperties
toResourceProperties FirehoseActionProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FirehoseActionProperty -> ()
batchMode :: FirehoseActionProperty -> Maybe (Value Bool)
deliveryStreamName :: FirehoseActionProperty -> Value Text
roleArn :: FirehoseActionProperty -> Value Text
separator :: FirehoseActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
batchMode :: Maybe (Value Bool)
deliveryStreamName :: Value Text
roleArn :: Value Text
separator :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoT::TopicRule.FirehoseAction",
         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
"DeliveryStreamName" 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
deliveryStreamName,
                            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]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BatchMode" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
batchMode,
                               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
"Separator" (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)
separator]))}
instance JSON.ToJSON FirehoseActionProperty where
  toJSON :: FirehoseActionProperty -> Value
toJSON FirehoseActionProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FirehoseActionProperty -> ()
batchMode :: FirehoseActionProperty -> Maybe (Value Bool)
deliveryStreamName :: FirehoseActionProperty -> Value Text
roleArn :: FirehoseActionProperty -> Value Text
separator :: FirehoseActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
batchMode :: Maybe (Value Bool)
deliveryStreamName :: Value Text
roleArn :: Value Text
separator :: Maybe (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
"DeliveryStreamName" 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
deliveryStreamName,
               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]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BatchMode" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
batchMode,
                  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
"Separator" (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)
separator])))
instance Property "BatchMode" FirehoseActionProperty where
  type PropertyType "BatchMode" FirehoseActionProperty = Value Prelude.Bool
  set :: PropertyType "BatchMode" FirehoseActionProperty
-> FirehoseActionProperty -> FirehoseActionProperty
set PropertyType "BatchMode" FirehoseActionProperty
newValue FirehoseActionProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FirehoseActionProperty -> ()
batchMode :: FirehoseActionProperty -> Maybe (Value Bool)
deliveryStreamName :: FirehoseActionProperty -> Value Text
roleArn :: FirehoseActionProperty -> Value Text
separator :: FirehoseActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
batchMode :: Maybe (Value Bool)
deliveryStreamName :: Value Text
roleArn :: Value Text
separator :: Maybe (Value Text)
..}
    = FirehoseActionProperty {batchMode :: Maybe (Value Bool)
batchMode = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BatchMode" FirehoseActionProperty
Value Bool
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
deliveryStreamName :: Value Text
roleArn :: Value Text
separator :: Maybe (Value Text)
haddock_workaround_ :: ()
deliveryStreamName :: Value Text
roleArn :: Value Text
separator :: Maybe (Value Text)
..}
instance Property "DeliveryStreamName" FirehoseActionProperty where
  type PropertyType "DeliveryStreamName" FirehoseActionProperty = Value Prelude.Text
  set :: PropertyType "DeliveryStreamName" FirehoseActionProperty
-> FirehoseActionProperty -> FirehoseActionProperty
set PropertyType "DeliveryStreamName" FirehoseActionProperty
newValue FirehoseActionProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FirehoseActionProperty -> ()
batchMode :: FirehoseActionProperty -> Maybe (Value Bool)
deliveryStreamName :: FirehoseActionProperty -> Value Text
roleArn :: FirehoseActionProperty -> Value Text
separator :: FirehoseActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
batchMode :: Maybe (Value Bool)
deliveryStreamName :: Value Text
roleArn :: Value Text
separator :: Maybe (Value Text)
..}
    = FirehoseActionProperty {deliveryStreamName :: Value Text
deliveryStreamName = PropertyType "DeliveryStreamName" FirehoseActionProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
batchMode :: Maybe (Value Bool)
roleArn :: Value Text
separator :: Maybe (Value Text)
haddock_workaround_ :: ()
batchMode :: Maybe (Value Bool)
roleArn :: Value Text
separator :: Maybe (Value Text)
..}
instance Property "RoleArn" FirehoseActionProperty where
  type PropertyType "RoleArn" FirehoseActionProperty = Value Prelude.Text
  set :: PropertyType "RoleArn" FirehoseActionProperty
-> FirehoseActionProperty -> FirehoseActionProperty
set PropertyType "RoleArn" FirehoseActionProperty
newValue FirehoseActionProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FirehoseActionProperty -> ()
batchMode :: FirehoseActionProperty -> Maybe (Value Bool)
deliveryStreamName :: FirehoseActionProperty -> Value Text
roleArn :: FirehoseActionProperty -> Value Text
separator :: FirehoseActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
batchMode :: Maybe (Value Bool)
deliveryStreamName :: Value Text
roleArn :: Value Text
separator :: Maybe (Value Text)
..}
    = FirehoseActionProperty {roleArn :: Value Text
roleArn = PropertyType "RoleArn" FirehoseActionProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
batchMode :: Maybe (Value Bool)
deliveryStreamName :: Value Text
separator :: Maybe (Value Text)
haddock_workaround_ :: ()
batchMode :: Maybe (Value Bool)
deliveryStreamName :: Value Text
separator :: Maybe (Value Text)
..}
instance Property "Separator" FirehoseActionProperty where
  type PropertyType "Separator" FirehoseActionProperty = Value Prelude.Text
  set :: PropertyType "Separator" FirehoseActionProperty
-> FirehoseActionProperty -> FirehoseActionProperty
set PropertyType "Separator" FirehoseActionProperty
newValue FirehoseActionProperty {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FirehoseActionProperty -> ()
batchMode :: FirehoseActionProperty -> Maybe (Value Bool)
deliveryStreamName :: FirehoseActionProperty -> Value Text
roleArn :: FirehoseActionProperty -> Value Text
separator :: FirehoseActionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
batchMode :: Maybe (Value Bool)
deliveryStreamName :: Value Text
roleArn :: Value Text
separator :: Maybe (Value Text)
..}
    = FirehoseActionProperty {separator :: Maybe (Value Text)
separator = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Separator" FirehoseActionProperty
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
batchMode :: Maybe (Value Bool)
deliveryStreamName :: Value Text
roleArn :: Value Text
haddock_workaround_ :: ()
batchMode :: Maybe (Value Bool)
deliveryStreamName :: Value Text
roleArn :: Value Text
..}