module Stratosphere.IoT.TopicRule.RepublishActionProperty (
        module Exports, RepublishActionProperty(..),
        mkRepublishActionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoT.TopicRule.RepublishActionHeadersProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RepublishActionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-republishaction.html>
    RepublishActionProperty {RepublishActionProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-republishaction.html#cfn-iot-topicrule-republishaction-headers>
                             RepublishActionProperty -> Maybe RepublishActionHeadersProperty
headers :: (Prelude.Maybe RepublishActionHeadersProperty),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-republishaction.html#cfn-iot-topicrule-republishaction-qos>
                             RepublishActionProperty -> Maybe (Value Integer)
qos :: (Prelude.Maybe (Value Prelude.Integer)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-republishaction.html#cfn-iot-topicrule-republishaction-rolearn>
                             RepublishActionProperty -> Value Text
roleArn :: (Value Prelude.Text),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-republishaction.html#cfn-iot-topicrule-republishaction-topic>
                             RepublishActionProperty -> Value Text
topic :: (Value Prelude.Text)}
  deriving stock (RepublishActionProperty -> RepublishActionProperty -> Bool
(RepublishActionProperty -> RepublishActionProperty -> Bool)
-> (RepublishActionProperty -> RepublishActionProperty -> Bool)
-> Eq RepublishActionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RepublishActionProperty -> RepublishActionProperty -> Bool
== :: RepublishActionProperty -> RepublishActionProperty -> Bool
$c/= :: RepublishActionProperty -> RepublishActionProperty -> Bool
/= :: RepublishActionProperty -> RepublishActionProperty -> Bool
Prelude.Eq, Int -> RepublishActionProperty -> ShowS
[RepublishActionProperty] -> ShowS
RepublishActionProperty -> String
(Int -> RepublishActionProperty -> ShowS)
-> (RepublishActionProperty -> String)
-> ([RepublishActionProperty] -> ShowS)
-> Show RepublishActionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RepublishActionProperty -> ShowS
showsPrec :: Int -> RepublishActionProperty -> ShowS
$cshow :: RepublishActionProperty -> String
show :: RepublishActionProperty -> String
$cshowList :: [RepublishActionProperty] -> ShowS
showList :: [RepublishActionProperty] -> ShowS
Prelude.Show)
mkRepublishActionProperty ::
  Value Prelude.Text -> Value Prelude.Text -> RepublishActionProperty
mkRepublishActionProperty :: Value Text -> Value Text -> RepublishActionProperty
mkRepublishActionProperty Value Text
roleArn Value Text
topic
  = RepublishActionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), roleArn :: Value Text
roleArn = Value Text
roleArn, topic :: Value Text
topic = Value Text
topic,
       headers :: Maybe RepublishActionHeadersProperty
headers = Maybe RepublishActionHeadersProperty
forall a. Maybe a
Prelude.Nothing, qos :: Maybe (Value Integer)
qos = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RepublishActionProperty where
  toResourceProperties :: RepublishActionProperty -> ResourceProperties
toResourceProperties RepublishActionProperty {Maybe (Value Integer)
Maybe RepublishActionHeadersProperty
()
Value Text
haddock_workaround_ :: RepublishActionProperty -> ()
headers :: RepublishActionProperty -> Maybe RepublishActionHeadersProperty
qos :: RepublishActionProperty -> Maybe (Value Integer)
roleArn :: RepublishActionProperty -> Value Text
topic :: RepublishActionProperty -> Value Text
haddock_workaround_ :: ()
headers :: Maybe RepublishActionHeadersProperty
qos :: Maybe (Value Integer)
roleArn :: Value Text
topic :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoT::TopicRule.RepublishAction",
         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
"Topic" 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
topic]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> RepublishActionHeadersProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Headers" (RepublishActionHeadersProperty -> (Key, Value))
-> Maybe RepublishActionHeadersProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RepublishActionHeadersProperty
headers,
                               Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Qos" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
qos]))}
instance JSON.ToJSON RepublishActionProperty where
  toJSON :: RepublishActionProperty -> Value
toJSON RepublishActionProperty {Maybe (Value Integer)
Maybe RepublishActionHeadersProperty
()
Value Text
haddock_workaround_ :: RepublishActionProperty -> ()
headers :: RepublishActionProperty -> Maybe RepublishActionHeadersProperty
qos :: RepublishActionProperty -> Maybe (Value Integer)
roleArn :: RepublishActionProperty -> Value Text
topic :: RepublishActionProperty -> Value Text
haddock_workaround_ :: ()
headers :: Maybe RepublishActionHeadersProperty
qos :: Maybe (Value Integer)
roleArn :: Value Text
topic :: 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
"Topic" 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
topic]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> RepublishActionHeadersProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Headers" (RepublishActionHeadersProperty -> (Key, Value))
-> Maybe RepublishActionHeadersProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RepublishActionHeadersProperty
headers,
                  Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Qos" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
qos])))
instance Property "Headers" RepublishActionProperty where
  type PropertyType "Headers" RepublishActionProperty = RepublishActionHeadersProperty
  set :: PropertyType "Headers" RepublishActionProperty
-> RepublishActionProperty -> RepublishActionProperty
set PropertyType "Headers" RepublishActionProperty
newValue RepublishActionProperty {Maybe (Value Integer)
Maybe RepublishActionHeadersProperty
()
Value Text
haddock_workaround_ :: RepublishActionProperty -> ()
headers :: RepublishActionProperty -> Maybe RepublishActionHeadersProperty
qos :: RepublishActionProperty -> Maybe (Value Integer)
roleArn :: RepublishActionProperty -> Value Text
topic :: RepublishActionProperty -> Value Text
haddock_workaround_ :: ()
headers :: Maybe RepublishActionHeadersProperty
qos :: Maybe (Value Integer)
roleArn :: Value Text
topic :: Value Text
..}
    = RepublishActionProperty {headers :: Maybe RepublishActionHeadersProperty
headers = RepublishActionHeadersProperty
-> Maybe RepublishActionHeadersProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Headers" RepublishActionProperty
RepublishActionHeadersProperty
newValue, Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
qos :: Maybe (Value Integer)
roleArn :: Value Text
topic :: Value Text
haddock_workaround_ :: ()
qos :: Maybe (Value Integer)
roleArn :: Value Text
topic :: Value Text
..}
instance Property "Qos" RepublishActionProperty where
  type PropertyType "Qos" RepublishActionProperty = Value Prelude.Integer
  set :: PropertyType "Qos" RepublishActionProperty
-> RepublishActionProperty -> RepublishActionProperty
set PropertyType "Qos" RepublishActionProperty
newValue RepublishActionProperty {Maybe (Value Integer)
Maybe RepublishActionHeadersProperty
()
Value Text
haddock_workaround_ :: RepublishActionProperty -> ()
headers :: RepublishActionProperty -> Maybe RepublishActionHeadersProperty
qos :: RepublishActionProperty -> Maybe (Value Integer)
roleArn :: RepublishActionProperty -> Value Text
topic :: RepublishActionProperty -> Value Text
haddock_workaround_ :: ()
headers :: Maybe RepublishActionHeadersProperty
qos :: Maybe (Value Integer)
roleArn :: Value Text
topic :: Value Text
..}
    = RepublishActionProperty {qos :: Maybe (Value Integer)
qos = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Qos" RepublishActionProperty
Value Integer
newValue, Maybe RepublishActionHeadersProperty
()
Value Text
haddock_workaround_ :: ()
headers :: Maybe RepublishActionHeadersProperty
roleArn :: Value Text
topic :: Value Text
haddock_workaround_ :: ()
headers :: Maybe RepublishActionHeadersProperty
roleArn :: Value Text
topic :: Value Text
..}
instance Property "RoleArn" RepublishActionProperty where
  type PropertyType "RoleArn" RepublishActionProperty = Value Prelude.Text
  set :: PropertyType "RoleArn" RepublishActionProperty
-> RepublishActionProperty -> RepublishActionProperty
set PropertyType "RoleArn" RepublishActionProperty
newValue RepublishActionProperty {Maybe (Value Integer)
Maybe RepublishActionHeadersProperty
()
Value Text
haddock_workaround_ :: RepublishActionProperty -> ()
headers :: RepublishActionProperty -> Maybe RepublishActionHeadersProperty
qos :: RepublishActionProperty -> Maybe (Value Integer)
roleArn :: RepublishActionProperty -> Value Text
topic :: RepublishActionProperty -> Value Text
haddock_workaround_ :: ()
headers :: Maybe RepublishActionHeadersProperty
qos :: Maybe (Value Integer)
roleArn :: Value Text
topic :: Value Text
..}
    = RepublishActionProperty {roleArn :: Value Text
roleArn = PropertyType "RoleArn" RepublishActionProperty
Value Text
newValue, Maybe (Value Integer)
Maybe RepublishActionHeadersProperty
()
Value Text
haddock_workaround_ :: ()
headers :: Maybe RepublishActionHeadersProperty
qos :: Maybe (Value Integer)
topic :: Value Text
haddock_workaround_ :: ()
headers :: Maybe RepublishActionHeadersProperty
qos :: Maybe (Value Integer)
topic :: Value Text
..}
instance Property "Topic" RepublishActionProperty where
  type PropertyType "Topic" RepublishActionProperty = Value Prelude.Text
  set :: PropertyType "Topic" RepublishActionProperty
-> RepublishActionProperty -> RepublishActionProperty
set PropertyType "Topic" RepublishActionProperty
newValue RepublishActionProperty {Maybe (Value Integer)
Maybe RepublishActionHeadersProperty
()
Value Text
haddock_workaround_ :: RepublishActionProperty -> ()
headers :: RepublishActionProperty -> Maybe RepublishActionHeadersProperty
qos :: RepublishActionProperty -> Maybe (Value Integer)
roleArn :: RepublishActionProperty -> Value Text
topic :: RepublishActionProperty -> Value Text
haddock_workaround_ :: ()
headers :: Maybe RepublishActionHeadersProperty
qos :: Maybe (Value Integer)
roleArn :: Value Text
topic :: Value Text
..}
    = RepublishActionProperty {topic :: Value Text
topic = PropertyType "Topic" RepublishActionProperty
Value Text
newValue, Maybe (Value Integer)
Maybe RepublishActionHeadersProperty
()
Value Text
haddock_workaround_ :: ()
headers :: Maybe RepublishActionHeadersProperty
qos :: Maybe (Value Integer)
roleArn :: Value Text
haddock_workaround_ :: ()
headers :: Maybe RepublishActionHeadersProperty
qos :: Maybe (Value Integer)
roleArn :: Value Text
..}