module Stratosphere.APS.Scraper.ScraperLoggingDestinationProperty (
        module Exports, ScraperLoggingDestinationProperty(..),
        mkScraperLoggingDestinationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.APS.Scraper.CloudWatchLogDestinationProperty as Exports
import Stratosphere.ResourceProperties
data ScraperLoggingDestinationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scraperloggingdestination.html>
    ScraperLoggingDestinationProperty {ScraperLoggingDestinationProperty -> ()
haddock_workaround_ :: (),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scraperloggingdestination.html#cfn-aps-scraper-scraperloggingdestination-cloudwatchlogs>
                                       ScraperLoggingDestinationProperty
-> Maybe CloudWatchLogDestinationProperty
cloudWatchLogs :: (Prelude.Maybe CloudWatchLogDestinationProperty)}
  deriving stock (ScraperLoggingDestinationProperty
-> ScraperLoggingDestinationProperty -> Bool
(ScraperLoggingDestinationProperty
 -> ScraperLoggingDestinationProperty -> Bool)
-> (ScraperLoggingDestinationProperty
    -> ScraperLoggingDestinationProperty -> Bool)
-> Eq ScraperLoggingDestinationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ScraperLoggingDestinationProperty
-> ScraperLoggingDestinationProperty -> Bool
== :: ScraperLoggingDestinationProperty
-> ScraperLoggingDestinationProperty -> Bool
$c/= :: ScraperLoggingDestinationProperty
-> ScraperLoggingDestinationProperty -> Bool
/= :: ScraperLoggingDestinationProperty
-> ScraperLoggingDestinationProperty -> Bool
Prelude.Eq, Int -> ScraperLoggingDestinationProperty -> ShowS
[ScraperLoggingDestinationProperty] -> ShowS
ScraperLoggingDestinationProperty -> String
(Int -> ScraperLoggingDestinationProperty -> ShowS)
-> (ScraperLoggingDestinationProperty -> String)
-> ([ScraperLoggingDestinationProperty] -> ShowS)
-> Show ScraperLoggingDestinationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ScraperLoggingDestinationProperty -> ShowS
showsPrec :: Int -> ScraperLoggingDestinationProperty -> ShowS
$cshow :: ScraperLoggingDestinationProperty -> String
show :: ScraperLoggingDestinationProperty -> String
$cshowList :: [ScraperLoggingDestinationProperty] -> ShowS
showList :: [ScraperLoggingDestinationProperty] -> ShowS
Prelude.Show)
mkScraperLoggingDestinationProperty ::
  ScraperLoggingDestinationProperty
mkScraperLoggingDestinationProperty :: ScraperLoggingDestinationProperty
mkScraperLoggingDestinationProperty
  = ScraperLoggingDestinationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), cloudWatchLogs :: Maybe CloudWatchLogDestinationProperty
cloudWatchLogs = Maybe CloudWatchLogDestinationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ScraperLoggingDestinationProperty where
  toResourceProperties :: ScraperLoggingDestinationProperty -> ResourceProperties
toResourceProperties ScraperLoggingDestinationProperty {Maybe CloudWatchLogDestinationProperty
()
haddock_workaround_ :: ScraperLoggingDestinationProperty -> ()
cloudWatchLogs :: ScraperLoggingDestinationProperty
-> Maybe CloudWatchLogDestinationProperty
haddock_workaround_ :: ()
cloudWatchLogs :: Maybe CloudWatchLogDestinationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::APS::Scraper.ScraperLoggingDestination",
         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 -> CloudWatchLogDestinationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CloudWatchLogs" (CloudWatchLogDestinationProperty -> (Key, Value))
-> Maybe CloudWatchLogDestinationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchLogDestinationProperty
cloudWatchLogs])}
instance JSON.ToJSON ScraperLoggingDestinationProperty where
  toJSON :: ScraperLoggingDestinationProperty -> Value
toJSON ScraperLoggingDestinationProperty {Maybe CloudWatchLogDestinationProperty
()
haddock_workaround_ :: ScraperLoggingDestinationProperty -> ()
cloudWatchLogs :: ScraperLoggingDestinationProperty
-> Maybe CloudWatchLogDestinationProperty
haddock_workaround_ :: ()
cloudWatchLogs :: Maybe CloudWatchLogDestinationProperty
..}
    = [(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 -> CloudWatchLogDestinationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CloudWatchLogs" (CloudWatchLogDestinationProperty -> (Key, Value))
-> Maybe CloudWatchLogDestinationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchLogDestinationProperty
cloudWatchLogs]))
instance Property "CloudWatchLogs" ScraperLoggingDestinationProperty where
  type PropertyType "CloudWatchLogs" ScraperLoggingDestinationProperty = CloudWatchLogDestinationProperty
  set :: PropertyType "CloudWatchLogs" ScraperLoggingDestinationProperty
-> ScraperLoggingDestinationProperty
-> ScraperLoggingDestinationProperty
set PropertyType "CloudWatchLogs" ScraperLoggingDestinationProperty
newValue ScraperLoggingDestinationProperty {Maybe CloudWatchLogDestinationProperty
()
haddock_workaround_ :: ScraperLoggingDestinationProperty -> ()
cloudWatchLogs :: ScraperLoggingDestinationProperty
-> Maybe CloudWatchLogDestinationProperty
haddock_workaround_ :: ()
cloudWatchLogs :: Maybe CloudWatchLogDestinationProperty
..}
    = ScraperLoggingDestinationProperty
        {cloudWatchLogs :: Maybe CloudWatchLogDestinationProperty
cloudWatchLogs = CloudWatchLogDestinationProperty
-> Maybe CloudWatchLogDestinationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CloudWatchLogs" ScraperLoggingDestinationProperty
CloudWatchLogDestinationProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}