module Stratosphere.ElastiCache.CacheCluster.DestinationDetailsProperty (
        module Exports, DestinationDetailsProperty(..),
        mkDestinationDetailsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ElastiCache.CacheCluster.CloudWatchLogsDestinationDetailsProperty as Exports
import {-# SOURCE #-} Stratosphere.ElastiCache.CacheCluster.KinesisFirehoseDestinationDetailsProperty as Exports
import Stratosphere.ResourceProperties
data DestinationDetailsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-cachecluster-destinationdetails.html>
    DestinationDetailsProperty {DestinationDetailsProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-cachecluster-destinationdetails.html#cfn-elasticache-cachecluster-destinationdetails-cloudwatchlogsdetails>
                                DestinationDetailsProperty
-> Maybe CloudWatchLogsDestinationDetailsProperty
cloudWatchLogsDetails :: (Prelude.Maybe CloudWatchLogsDestinationDetailsProperty),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticache-cachecluster-destinationdetails.html#cfn-elasticache-cachecluster-destinationdetails-kinesisfirehosedetails>
                                DestinationDetailsProperty
-> Maybe KinesisFirehoseDestinationDetailsProperty
kinesisFirehoseDetails :: (Prelude.Maybe KinesisFirehoseDestinationDetailsProperty)}
  deriving stock (DestinationDetailsProperty -> DestinationDetailsProperty -> Bool
(DestinationDetailsProperty -> DestinationDetailsProperty -> Bool)
-> (DestinationDetailsProperty
    -> DestinationDetailsProperty -> Bool)
-> Eq DestinationDetailsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DestinationDetailsProperty -> DestinationDetailsProperty -> Bool
== :: DestinationDetailsProperty -> DestinationDetailsProperty -> Bool
$c/= :: DestinationDetailsProperty -> DestinationDetailsProperty -> Bool
/= :: DestinationDetailsProperty -> DestinationDetailsProperty -> Bool
Prelude.Eq, Int -> DestinationDetailsProperty -> ShowS
[DestinationDetailsProperty] -> ShowS
DestinationDetailsProperty -> String
(Int -> DestinationDetailsProperty -> ShowS)
-> (DestinationDetailsProperty -> String)
-> ([DestinationDetailsProperty] -> ShowS)
-> Show DestinationDetailsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DestinationDetailsProperty -> ShowS
showsPrec :: Int -> DestinationDetailsProperty -> ShowS
$cshow :: DestinationDetailsProperty -> String
show :: DestinationDetailsProperty -> String
$cshowList :: [DestinationDetailsProperty] -> ShowS
showList :: [DestinationDetailsProperty] -> ShowS
Prelude.Show)
mkDestinationDetailsProperty :: DestinationDetailsProperty
mkDestinationDetailsProperty :: DestinationDetailsProperty
mkDestinationDetailsProperty
  = DestinationDetailsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), cloudWatchLogsDetails :: Maybe CloudWatchLogsDestinationDetailsProperty
cloudWatchLogsDetails = Maybe CloudWatchLogsDestinationDetailsProperty
forall a. Maybe a
Prelude.Nothing,
       kinesisFirehoseDetails :: Maybe KinesisFirehoseDestinationDetailsProperty
kinesisFirehoseDetails = Maybe KinesisFirehoseDestinationDetailsProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DestinationDetailsProperty where
  toResourceProperties :: DestinationDetailsProperty -> ResourceProperties
toResourceProperties DestinationDetailsProperty {Maybe CloudWatchLogsDestinationDetailsProperty
Maybe KinesisFirehoseDestinationDetailsProperty
()
haddock_workaround_ :: DestinationDetailsProperty -> ()
cloudWatchLogsDetails :: DestinationDetailsProperty
-> Maybe CloudWatchLogsDestinationDetailsProperty
kinesisFirehoseDetails :: DestinationDetailsProperty
-> Maybe KinesisFirehoseDestinationDetailsProperty
haddock_workaround_ :: ()
cloudWatchLogsDetails :: Maybe CloudWatchLogsDestinationDetailsProperty
kinesisFirehoseDetails :: Maybe KinesisFirehoseDestinationDetailsProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ElastiCache::CacheCluster.DestinationDetails",
         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 -> CloudWatchLogsDestinationDetailsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CloudWatchLogsDetails"
                              (CloudWatchLogsDestinationDetailsProperty -> (Key, Value))
-> Maybe CloudWatchLogsDestinationDetailsProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchLogsDestinationDetailsProperty
cloudWatchLogsDetails,
                            Key -> KinesisFirehoseDestinationDetailsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KinesisFirehoseDetails"
                              (KinesisFirehoseDestinationDetailsProperty -> (Key, Value))
-> Maybe KinesisFirehoseDestinationDetailsProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KinesisFirehoseDestinationDetailsProperty
kinesisFirehoseDetails])}
instance JSON.ToJSON DestinationDetailsProperty where
  toJSON :: DestinationDetailsProperty -> Value
toJSON DestinationDetailsProperty {Maybe CloudWatchLogsDestinationDetailsProperty
Maybe KinesisFirehoseDestinationDetailsProperty
()
haddock_workaround_ :: DestinationDetailsProperty -> ()
cloudWatchLogsDetails :: DestinationDetailsProperty
-> Maybe CloudWatchLogsDestinationDetailsProperty
kinesisFirehoseDetails :: DestinationDetailsProperty
-> Maybe KinesisFirehoseDestinationDetailsProperty
haddock_workaround_ :: ()
cloudWatchLogsDetails :: Maybe CloudWatchLogsDestinationDetailsProperty
kinesisFirehoseDetails :: Maybe KinesisFirehoseDestinationDetailsProperty
..}
    = [(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 -> CloudWatchLogsDestinationDetailsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CloudWatchLogsDetails"
                 (CloudWatchLogsDestinationDetailsProperty -> (Key, Value))
-> Maybe CloudWatchLogsDestinationDetailsProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchLogsDestinationDetailsProperty
cloudWatchLogsDetails,
               Key -> KinesisFirehoseDestinationDetailsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"KinesisFirehoseDetails"
                 (KinesisFirehoseDestinationDetailsProperty -> (Key, Value))
-> Maybe KinesisFirehoseDestinationDetailsProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KinesisFirehoseDestinationDetailsProperty
kinesisFirehoseDetails]))
instance Property "CloudWatchLogsDetails" DestinationDetailsProperty where
  type PropertyType "CloudWatchLogsDetails" DestinationDetailsProperty = CloudWatchLogsDestinationDetailsProperty
  set :: PropertyType "CloudWatchLogsDetails" DestinationDetailsProperty
-> DestinationDetailsProperty -> DestinationDetailsProperty
set PropertyType "CloudWatchLogsDetails" DestinationDetailsProperty
newValue DestinationDetailsProperty {Maybe CloudWatchLogsDestinationDetailsProperty
Maybe KinesisFirehoseDestinationDetailsProperty
()
haddock_workaround_ :: DestinationDetailsProperty -> ()
cloudWatchLogsDetails :: DestinationDetailsProperty
-> Maybe CloudWatchLogsDestinationDetailsProperty
kinesisFirehoseDetails :: DestinationDetailsProperty
-> Maybe KinesisFirehoseDestinationDetailsProperty
haddock_workaround_ :: ()
cloudWatchLogsDetails :: Maybe CloudWatchLogsDestinationDetailsProperty
kinesisFirehoseDetails :: Maybe KinesisFirehoseDestinationDetailsProperty
..}
    = DestinationDetailsProperty
        {cloudWatchLogsDetails :: Maybe CloudWatchLogsDestinationDetailsProperty
cloudWatchLogsDetails = CloudWatchLogsDestinationDetailsProperty
-> Maybe CloudWatchLogsDestinationDetailsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CloudWatchLogsDetails" DestinationDetailsProperty
CloudWatchLogsDestinationDetailsProperty
newValue, Maybe KinesisFirehoseDestinationDetailsProperty
()
haddock_workaround_ :: ()
kinesisFirehoseDetails :: Maybe KinesisFirehoseDestinationDetailsProperty
haddock_workaround_ :: ()
kinesisFirehoseDetails :: Maybe KinesisFirehoseDestinationDetailsProperty
..}
instance Property "KinesisFirehoseDetails" DestinationDetailsProperty where
  type PropertyType "KinesisFirehoseDetails" DestinationDetailsProperty = KinesisFirehoseDestinationDetailsProperty
  set :: PropertyType "KinesisFirehoseDetails" DestinationDetailsProperty
-> DestinationDetailsProperty -> DestinationDetailsProperty
set PropertyType "KinesisFirehoseDetails" DestinationDetailsProperty
newValue DestinationDetailsProperty {Maybe CloudWatchLogsDestinationDetailsProperty
Maybe KinesisFirehoseDestinationDetailsProperty
()
haddock_workaround_ :: DestinationDetailsProperty -> ()
cloudWatchLogsDetails :: DestinationDetailsProperty
-> Maybe CloudWatchLogsDestinationDetailsProperty
kinesisFirehoseDetails :: DestinationDetailsProperty
-> Maybe KinesisFirehoseDestinationDetailsProperty
haddock_workaround_ :: ()
cloudWatchLogsDetails :: Maybe CloudWatchLogsDestinationDetailsProperty
kinesisFirehoseDetails :: Maybe KinesisFirehoseDestinationDetailsProperty
..}
    = DestinationDetailsProperty
        {kinesisFirehoseDetails :: Maybe KinesisFirehoseDestinationDetailsProperty
kinesisFirehoseDetails = KinesisFirehoseDestinationDetailsProperty
-> Maybe KinesisFirehoseDestinationDetailsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "KinesisFirehoseDetails" DestinationDetailsProperty
KinesisFirehoseDestinationDetailsProperty
newValue, Maybe CloudWatchLogsDestinationDetailsProperty
()
haddock_workaround_ :: ()
cloudWatchLogsDetails :: Maybe CloudWatchLogsDestinationDetailsProperty
haddock_workaround_ :: ()
cloudWatchLogsDetails :: Maybe CloudWatchLogsDestinationDetailsProperty
..}