module Stratosphere.IoT.TopicRuleDestination (
module Exports, TopicRuleDestination(..), mkTopicRuleDestination
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoT.TopicRuleDestination.HttpUrlDestinationSummaryProperty as Exports
import {-# SOURCE #-} Stratosphere.IoT.TopicRuleDestination.VpcDestinationPropertiesProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TopicRuleDestination
=
TopicRuleDestination {TopicRuleDestination -> ()
haddock_workaround_ :: (),
TopicRuleDestination -> Maybe HttpUrlDestinationSummaryProperty
httpUrlProperties :: (Prelude.Maybe HttpUrlDestinationSummaryProperty),
TopicRuleDestination -> Maybe (Value Text)
status :: (Prelude.Maybe (Value Prelude.Text)),
TopicRuleDestination -> Maybe VpcDestinationPropertiesProperty
vpcProperties :: (Prelude.Maybe VpcDestinationPropertiesProperty)}
deriving stock (TopicRuleDestination -> TopicRuleDestination -> Bool
(TopicRuleDestination -> TopicRuleDestination -> Bool)
-> (TopicRuleDestination -> TopicRuleDestination -> Bool)
-> Eq TopicRuleDestination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TopicRuleDestination -> TopicRuleDestination -> Bool
== :: TopicRuleDestination -> TopicRuleDestination -> Bool
$c/= :: TopicRuleDestination -> TopicRuleDestination -> Bool
/= :: TopicRuleDestination -> TopicRuleDestination -> Bool
Prelude.Eq, Int -> TopicRuleDestination -> ShowS
[TopicRuleDestination] -> ShowS
TopicRuleDestination -> String
(Int -> TopicRuleDestination -> ShowS)
-> (TopicRuleDestination -> String)
-> ([TopicRuleDestination] -> ShowS)
-> Show TopicRuleDestination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TopicRuleDestination -> ShowS
showsPrec :: Int -> TopicRuleDestination -> ShowS
$cshow :: TopicRuleDestination -> String
show :: TopicRuleDestination -> String
$cshowList :: [TopicRuleDestination] -> ShowS
showList :: [TopicRuleDestination] -> ShowS
Prelude.Show)
mkTopicRuleDestination :: TopicRuleDestination
mkTopicRuleDestination :: TopicRuleDestination
mkTopicRuleDestination
= TopicRuleDestination
{haddock_workaround_ :: ()
haddock_workaround_ = (), httpUrlProperties :: Maybe HttpUrlDestinationSummaryProperty
httpUrlProperties = Maybe HttpUrlDestinationSummaryProperty
forall a. Maybe a
Prelude.Nothing,
status :: Maybe (Value Text)
status = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, vpcProperties :: Maybe VpcDestinationPropertiesProperty
vpcProperties = Maybe VpcDestinationPropertiesProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TopicRuleDestination where
toResourceProperties :: TopicRuleDestination -> ResourceProperties
toResourceProperties TopicRuleDestination {Maybe (Value Text)
Maybe HttpUrlDestinationSummaryProperty
Maybe VpcDestinationPropertiesProperty
()
haddock_workaround_ :: TopicRuleDestination -> ()
httpUrlProperties :: TopicRuleDestination -> Maybe HttpUrlDestinationSummaryProperty
status :: TopicRuleDestination -> Maybe (Value Text)
vpcProperties :: TopicRuleDestination -> Maybe VpcDestinationPropertiesProperty
haddock_workaround_ :: ()
httpUrlProperties :: Maybe HttpUrlDestinationSummaryProperty
status :: Maybe (Value Text)
vpcProperties :: Maybe VpcDestinationPropertiesProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoT::TopicRuleDestination",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> HttpUrlDestinationSummaryProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HttpUrlProperties" (HttpUrlDestinationSummaryProperty -> (Key, Value))
-> Maybe HttpUrlDestinationSummaryProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HttpUrlDestinationSummaryProperty
httpUrlProperties,
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
"Status" (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)
status,
Key -> VpcDestinationPropertiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"VpcProperties" (VpcDestinationPropertiesProperty -> (Key, Value))
-> Maybe VpcDestinationPropertiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VpcDestinationPropertiesProperty
vpcProperties])}
instance JSON.ToJSON TopicRuleDestination where
toJSON :: TopicRuleDestination -> Value
toJSON TopicRuleDestination {Maybe (Value Text)
Maybe HttpUrlDestinationSummaryProperty
Maybe VpcDestinationPropertiesProperty
()
haddock_workaround_ :: TopicRuleDestination -> ()
httpUrlProperties :: TopicRuleDestination -> Maybe HttpUrlDestinationSummaryProperty
status :: TopicRuleDestination -> Maybe (Value Text)
vpcProperties :: TopicRuleDestination -> Maybe VpcDestinationPropertiesProperty
haddock_workaround_ :: ()
httpUrlProperties :: Maybe HttpUrlDestinationSummaryProperty
status :: Maybe (Value Text)
vpcProperties :: Maybe VpcDestinationPropertiesProperty
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> HttpUrlDestinationSummaryProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HttpUrlProperties" (HttpUrlDestinationSummaryProperty -> (Key, Value))
-> Maybe HttpUrlDestinationSummaryProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HttpUrlDestinationSummaryProperty
httpUrlProperties,
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
"Status" (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)
status,
Key -> VpcDestinationPropertiesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"VpcProperties" (VpcDestinationPropertiesProperty -> (Key, Value))
-> Maybe VpcDestinationPropertiesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VpcDestinationPropertiesProperty
vpcProperties]))
instance Property "HttpUrlProperties" TopicRuleDestination where
type PropertyType "HttpUrlProperties" TopicRuleDestination = HttpUrlDestinationSummaryProperty
set :: PropertyType "HttpUrlProperties" TopicRuleDestination
-> TopicRuleDestination -> TopicRuleDestination
set PropertyType "HttpUrlProperties" TopicRuleDestination
newValue TopicRuleDestination {Maybe (Value Text)
Maybe HttpUrlDestinationSummaryProperty
Maybe VpcDestinationPropertiesProperty
()
haddock_workaround_ :: TopicRuleDestination -> ()
httpUrlProperties :: TopicRuleDestination -> Maybe HttpUrlDestinationSummaryProperty
status :: TopicRuleDestination -> Maybe (Value Text)
vpcProperties :: TopicRuleDestination -> Maybe VpcDestinationPropertiesProperty
haddock_workaround_ :: ()
httpUrlProperties :: Maybe HttpUrlDestinationSummaryProperty
status :: Maybe (Value Text)
vpcProperties :: Maybe VpcDestinationPropertiesProperty
..}
= TopicRuleDestination
{httpUrlProperties :: Maybe HttpUrlDestinationSummaryProperty
httpUrlProperties = HttpUrlDestinationSummaryProperty
-> Maybe HttpUrlDestinationSummaryProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HttpUrlProperties" TopicRuleDestination
HttpUrlDestinationSummaryProperty
newValue, Maybe (Value Text)
Maybe VpcDestinationPropertiesProperty
()
haddock_workaround_ :: ()
status :: Maybe (Value Text)
vpcProperties :: Maybe VpcDestinationPropertiesProperty
haddock_workaround_ :: ()
status :: Maybe (Value Text)
vpcProperties :: Maybe VpcDestinationPropertiesProperty
..}
instance Property "Status" TopicRuleDestination where
type PropertyType "Status" TopicRuleDestination = Value Prelude.Text
set :: PropertyType "Status" TopicRuleDestination
-> TopicRuleDestination -> TopicRuleDestination
set PropertyType "Status" TopicRuleDestination
newValue TopicRuleDestination {Maybe (Value Text)
Maybe HttpUrlDestinationSummaryProperty
Maybe VpcDestinationPropertiesProperty
()
haddock_workaround_ :: TopicRuleDestination -> ()
httpUrlProperties :: TopicRuleDestination -> Maybe HttpUrlDestinationSummaryProperty
status :: TopicRuleDestination -> Maybe (Value Text)
vpcProperties :: TopicRuleDestination -> Maybe VpcDestinationPropertiesProperty
haddock_workaround_ :: ()
httpUrlProperties :: Maybe HttpUrlDestinationSummaryProperty
status :: Maybe (Value Text)
vpcProperties :: Maybe VpcDestinationPropertiesProperty
..}
= TopicRuleDestination {status :: Maybe (Value Text)
status = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Status" TopicRuleDestination
Value Text
newValue, Maybe HttpUrlDestinationSummaryProperty
Maybe VpcDestinationPropertiesProperty
()
haddock_workaround_ :: ()
httpUrlProperties :: Maybe HttpUrlDestinationSummaryProperty
vpcProperties :: Maybe VpcDestinationPropertiesProperty
haddock_workaround_ :: ()
httpUrlProperties :: Maybe HttpUrlDestinationSummaryProperty
vpcProperties :: Maybe VpcDestinationPropertiesProperty
..}
instance Property "VpcProperties" TopicRuleDestination where
type PropertyType "VpcProperties" TopicRuleDestination = VpcDestinationPropertiesProperty
set :: PropertyType "VpcProperties" TopicRuleDestination
-> TopicRuleDestination -> TopicRuleDestination
set PropertyType "VpcProperties" TopicRuleDestination
newValue TopicRuleDestination {Maybe (Value Text)
Maybe HttpUrlDestinationSummaryProperty
Maybe VpcDestinationPropertiesProperty
()
haddock_workaround_ :: TopicRuleDestination -> ()
httpUrlProperties :: TopicRuleDestination -> Maybe HttpUrlDestinationSummaryProperty
status :: TopicRuleDestination -> Maybe (Value Text)
vpcProperties :: TopicRuleDestination -> Maybe VpcDestinationPropertiesProperty
haddock_workaround_ :: ()
httpUrlProperties :: Maybe HttpUrlDestinationSummaryProperty
status :: Maybe (Value Text)
vpcProperties :: Maybe VpcDestinationPropertiesProperty
..}
= TopicRuleDestination {vpcProperties :: Maybe VpcDestinationPropertiesProperty
vpcProperties = VpcDestinationPropertiesProperty
-> Maybe VpcDestinationPropertiesProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "VpcProperties" TopicRuleDestination
VpcDestinationPropertiesProperty
newValue, Maybe (Value Text)
Maybe HttpUrlDestinationSummaryProperty
()
haddock_workaround_ :: ()
httpUrlProperties :: Maybe HttpUrlDestinationSummaryProperty
status :: Maybe (Value Text)
haddock_workaround_ :: ()
httpUrlProperties :: Maybe HttpUrlDestinationSummaryProperty
status :: Maybe (Value Text)
..}