module Stratosphere.IoTAnalytics.Dataset.DatasetContentDeliveryRuleDestinationProperty (
        module Exports, DatasetContentDeliveryRuleDestinationProperty(..),
        mkDatasetContentDeliveryRuleDestinationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoTAnalytics.Dataset.IotEventsDestinationConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.IoTAnalytics.Dataset.S3DestinationConfigurationProperty as Exports
import Stratosphere.ResourceProperties
data DatasetContentDeliveryRuleDestinationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-datasetcontentdeliveryruledestination.html>
    DatasetContentDeliveryRuleDestinationProperty {DatasetContentDeliveryRuleDestinationProperty -> ()
haddock_workaround_ :: (),
                                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-datasetcontentdeliveryruledestination.html#cfn-iotanalytics-dataset-datasetcontentdeliveryruledestination-ioteventsdestinationconfiguration>
                                                   DatasetContentDeliveryRuleDestinationProperty
-> Maybe IotEventsDestinationConfigurationProperty
iotEventsDestinationConfiguration :: (Prelude.Maybe IotEventsDestinationConfigurationProperty),
                                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-datasetcontentdeliveryruledestination.html#cfn-iotanalytics-dataset-datasetcontentdeliveryruledestination-s3destinationconfiguration>
                                                   DatasetContentDeliveryRuleDestinationProperty
-> Maybe S3DestinationConfigurationProperty
s3DestinationConfiguration :: (Prelude.Maybe S3DestinationConfigurationProperty)}
  deriving stock (DatasetContentDeliveryRuleDestinationProperty
-> DatasetContentDeliveryRuleDestinationProperty -> Bool
(DatasetContentDeliveryRuleDestinationProperty
 -> DatasetContentDeliveryRuleDestinationProperty -> Bool)
-> (DatasetContentDeliveryRuleDestinationProperty
    -> DatasetContentDeliveryRuleDestinationProperty -> Bool)
-> Eq DatasetContentDeliveryRuleDestinationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DatasetContentDeliveryRuleDestinationProperty
-> DatasetContentDeliveryRuleDestinationProperty -> Bool
== :: DatasetContentDeliveryRuleDestinationProperty
-> DatasetContentDeliveryRuleDestinationProperty -> Bool
$c/= :: DatasetContentDeliveryRuleDestinationProperty
-> DatasetContentDeliveryRuleDestinationProperty -> Bool
/= :: DatasetContentDeliveryRuleDestinationProperty
-> DatasetContentDeliveryRuleDestinationProperty -> Bool
Prelude.Eq, Int -> DatasetContentDeliveryRuleDestinationProperty -> ShowS
[DatasetContentDeliveryRuleDestinationProperty] -> ShowS
DatasetContentDeliveryRuleDestinationProperty -> String
(Int -> DatasetContentDeliveryRuleDestinationProperty -> ShowS)
-> (DatasetContentDeliveryRuleDestinationProperty -> String)
-> ([DatasetContentDeliveryRuleDestinationProperty] -> ShowS)
-> Show DatasetContentDeliveryRuleDestinationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DatasetContentDeliveryRuleDestinationProperty -> ShowS
showsPrec :: Int -> DatasetContentDeliveryRuleDestinationProperty -> ShowS
$cshow :: DatasetContentDeliveryRuleDestinationProperty -> String
show :: DatasetContentDeliveryRuleDestinationProperty -> String
$cshowList :: [DatasetContentDeliveryRuleDestinationProperty] -> ShowS
showList :: [DatasetContentDeliveryRuleDestinationProperty] -> ShowS
Prelude.Show)
mkDatasetContentDeliveryRuleDestinationProperty ::
  DatasetContentDeliveryRuleDestinationProperty
mkDatasetContentDeliveryRuleDestinationProperty :: DatasetContentDeliveryRuleDestinationProperty
mkDatasetContentDeliveryRuleDestinationProperty
  = DatasetContentDeliveryRuleDestinationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       iotEventsDestinationConfiguration :: Maybe IotEventsDestinationConfigurationProperty
iotEventsDestinationConfiguration = Maybe IotEventsDestinationConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       s3DestinationConfiguration :: Maybe S3DestinationConfigurationProperty
s3DestinationConfiguration = Maybe S3DestinationConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DatasetContentDeliveryRuleDestinationProperty where
  toResourceProperties :: DatasetContentDeliveryRuleDestinationProperty -> ResourceProperties
toResourceProperties
    DatasetContentDeliveryRuleDestinationProperty {Maybe IotEventsDestinationConfigurationProperty
Maybe S3DestinationConfigurationProperty
()
haddock_workaround_ :: DatasetContentDeliveryRuleDestinationProperty -> ()
iotEventsDestinationConfiguration :: DatasetContentDeliveryRuleDestinationProperty
-> Maybe IotEventsDestinationConfigurationProperty
s3DestinationConfiguration :: DatasetContentDeliveryRuleDestinationProperty
-> Maybe S3DestinationConfigurationProperty
haddock_workaround_ :: ()
iotEventsDestinationConfiguration :: Maybe IotEventsDestinationConfigurationProperty
s3DestinationConfiguration :: Maybe S3DestinationConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoTAnalytics::Dataset.DatasetContentDeliveryRuleDestination",
         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 -> IotEventsDestinationConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IotEventsDestinationConfiguration"
                              (IotEventsDestinationConfigurationProperty -> (Key, Value))
-> Maybe IotEventsDestinationConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IotEventsDestinationConfigurationProperty
iotEventsDestinationConfiguration,
                            Key -> S3DestinationConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3DestinationConfiguration"
                              (S3DestinationConfigurationProperty -> (Key, Value))
-> Maybe S3DestinationConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3DestinationConfigurationProperty
s3DestinationConfiguration])}
instance JSON.ToJSON DatasetContentDeliveryRuleDestinationProperty where
  toJSON :: DatasetContentDeliveryRuleDestinationProperty -> Value
toJSON DatasetContentDeliveryRuleDestinationProperty {Maybe IotEventsDestinationConfigurationProperty
Maybe S3DestinationConfigurationProperty
()
haddock_workaround_ :: DatasetContentDeliveryRuleDestinationProperty -> ()
iotEventsDestinationConfiguration :: DatasetContentDeliveryRuleDestinationProperty
-> Maybe IotEventsDestinationConfigurationProperty
s3DestinationConfiguration :: DatasetContentDeliveryRuleDestinationProperty
-> Maybe S3DestinationConfigurationProperty
haddock_workaround_ :: ()
iotEventsDestinationConfiguration :: Maybe IotEventsDestinationConfigurationProperty
s3DestinationConfiguration :: Maybe S3DestinationConfigurationProperty
..}
    = [(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 -> IotEventsDestinationConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IotEventsDestinationConfiguration"
                 (IotEventsDestinationConfigurationProperty -> (Key, Value))
-> Maybe IotEventsDestinationConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IotEventsDestinationConfigurationProperty
iotEventsDestinationConfiguration,
               Key -> S3DestinationConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"S3DestinationConfiguration"
                 (S3DestinationConfigurationProperty -> (Key, Value))
-> Maybe S3DestinationConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3DestinationConfigurationProperty
s3DestinationConfiguration]))
instance Property "IotEventsDestinationConfiguration" DatasetContentDeliveryRuleDestinationProperty where
  type PropertyType "IotEventsDestinationConfiguration" DatasetContentDeliveryRuleDestinationProperty = IotEventsDestinationConfigurationProperty
  set :: PropertyType
  "IotEventsDestinationConfiguration"
  DatasetContentDeliveryRuleDestinationProperty
-> DatasetContentDeliveryRuleDestinationProperty
-> DatasetContentDeliveryRuleDestinationProperty
set PropertyType
  "IotEventsDestinationConfiguration"
  DatasetContentDeliveryRuleDestinationProperty
newValue DatasetContentDeliveryRuleDestinationProperty {Maybe IotEventsDestinationConfigurationProperty
Maybe S3DestinationConfigurationProperty
()
haddock_workaround_ :: DatasetContentDeliveryRuleDestinationProperty -> ()
iotEventsDestinationConfiguration :: DatasetContentDeliveryRuleDestinationProperty
-> Maybe IotEventsDestinationConfigurationProperty
s3DestinationConfiguration :: DatasetContentDeliveryRuleDestinationProperty
-> Maybe S3DestinationConfigurationProperty
haddock_workaround_ :: ()
iotEventsDestinationConfiguration :: Maybe IotEventsDestinationConfigurationProperty
s3DestinationConfiguration :: Maybe S3DestinationConfigurationProperty
..}
    = DatasetContentDeliveryRuleDestinationProperty
        {iotEventsDestinationConfiguration :: Maybe IotEventsDestinationConfigurationProperty
iotEventsDestinationConfiguration = IotEventsDestinationConfigurationProperty
-> Maybe IotEventsDestinationConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "IotEventsDestinationConfiguration"
  DatasetContentDeliveryRuleDestinationProperty
IotEventsDestinationConfigurationProperty
newValue, Maybe S3DestinationConfigurationProperty
()
haddock_workaround_ :: ()
s3DestinationConfiguration :: Maybe S3DestinationConfigurationProperty
haddock_workaround_ :: ()
s3DestinationConfiguration :: Maybe S3DestinationConfigurationProperty
..}
instance Property "S3DestinationConfiguration" DatasetContentDeliveryRuleDestinationProperty where
  type PropertyType "S3DestinationConfiguration" DatasetContentDeliveryRuleDestinationProperty = S3DestinationConfigurationProperty
  set :: PropertyType
  "S3DestinationConfiguration"
  DatasetContentDeliveryRuleDestinationProperty
-> DatasetContentDeliveryRuleDestinationProperty
-> DatasetContentDeliveryRuleDestinationProperty
set PropertyType
  "S3DestinationConfiguration"
  DatasetContentDeliveryRuleDestinationProperty
newValue DatasetContentDeliveryRuleDestinationProperty {Maybe IotEventsDestinationConfigurationProperty
Maybe S3DestinationConfigurationProperty
()
haddock_workaround_ :: DatasetContentDeliveryRuleDestinationProperty -> ()
iotEventsDestinationConfiguration :: DatasetContentDeliveryRuleDestinationProperty
-> Maybe IotEventsDestinationConfigurationProperty
s3DestinationConfiguration :: DatasetContentDeliveryRuleDestinationProperty
-> Maybe S3DestinationConfigurationProperty
haddock_workaround_ :: ()
iotEventsDestinationConfiguration :: Maybe IotEventsDestinationConfigurationProperty
s3DestinationConfiguration :: Maybe S3DestinationConfigurationProperty
..}
    = DatasetContentDeliveryRuleDestinationProperty
        {s3DestinationConfiguration :: Maybe S3DestinationConfigurationProperty
s3DestinationConfiguration = S3DestinationConfigurationProperty
-> Maybe S3DestinationConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "S3DestinationConfiguration"
  DatasetContentDeliveryRuleDestinationProperty
S3DestinationConfigurationProperty
newValue, Maybe IotEventsDestinationConfigurationProperty
()
haddock_workaround_ :: ()
iotEventsDestinationConfiguration :: Maybe IotEventsDestinationConfigurationProperty
haddock_workaround_ :: ()
iotEventsDestinationConfiguration :: Maybe IotEventsDestinationConfigurationProperty
..}