module Stratosphere.OSIS.Pipeline.LogPublishingOptionsProperty (
        module Exports, LogPublishingOptionsProperty(..),
        mkLogPublishingOptionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.OSIS.Pipeline.CloudWatchLogDestinationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LogPublishingOptionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-osis-pipeline-logpublishingoptions.html>
    LogPublishingOptionsProperty {LogPublishingOptionsProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-osis-pipeline-logpublishingoptions.html#cfn-osis-pipeline-logpublishingoptions-cloudwatchlogdestination>
                                  LogPublishingOptionsProperty
-> Maybe CloudWatchLogDestinationProperty
cloudWatchLogDestination :: (Prelude.Maybe CloudWatchLogDestinationProperty),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-osis-pipeline-logpublishingoptions.html#cfn-osis-pipeline-logpublishingoptions-isloggingenabled>
                                  LogPublishingOptionsProperty -> Maybe (Value Bool)
isLoggingEnabled :: (Prelude.Maybe (Value Prelude.Bool))}
  deriving stock (LogPublishingOptionsProperty
-> LogPublishingOptionsProperty -> Bool
(LogPublishingOptionsProperty
 -> LogPublishingOptionsProperty -> Bool)
-> (LogPublishingOptionsProperty
    -> LogPublishingOptionsProperty -> Bool)
-> Eq LogPublishingOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LogPublishingOptionsProperty
-> LogPublishingOptionsProperty -> Bool
== :: LogPublishingOptionsProperty
-> LogPublishingOptionsProperty -> Bool
$c/= :: LogPublishingOptionsProperty
-> LogPublishingOptionsProperty -> Bool
/= :: LogPublishingOptionsProperty
-> LogPublishingOptionsProperty -> Bool
Prelude.Eq, Int -> LogPublishingOptionsProperty -> ShowS
[LogPublishingOptionsProperty] -> ShowS
LogPublishingOptionsProperty -> String
(Int -> LogPublishingOptionsProperty -> ShowS)
-> (LogPublishingOptionsProperty -> String)
-> ([LogPublishingOptionsProperty] -> ShowS)
-> Show LogPublishingOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LogPublishingOptionsProperty -> ShowS
showsPrec :: Int -> LogPublishingOptionsProperty -> ShowS
$cshow :: LogPublishingOptionsProperty -> String
show :: LogPublishingOptionsProperty -> String
$cshowList :: [LogPublishingOptionsProperty] -> ShowS
showList :: [LogPublishingOptionsProperty] -> ShowS
Prelude.Show)
mkLogPublishingOptionsProperty :: LogPublishingOptionsProperty
mkLogPublishingOptionsProperty :: LogPublishingOptionsProperty
mkLogPublishingOptionsProperty
  = LogPublishingOptionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       cloudWatchLogDestination :: Maybe CloudWatchLogDestinationProperty
cloudWatchLogDestination = Maybe CloudWatchLogDestinationProperty
forall a. Maybe a
Prelude.Nothing,
       isLoggingEnabled :: Maybe (Value Bool)
isLoggingEnabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LogPublishingOptionsProperty where
  toResourceProperties :: LogPublishingOptionsProperty -> ResourceProperties
toResourceProperties LogPublishingOptionsProperty {Maybe (Value Bool)
Maybe CloudWatchLogDestinationProperty
()
haddock_workaround_ :: LogPublishingOptionsProperty -> ()
cloudWatchLogDestination :: LogPublishingOptionsProperty
-> Maybe CloudWatchLogDestinationProperty
isLoggingEnabled :: LogPublishingOptionsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
cloudWatchLogDestination :: Maybe CloudWatchLogDestinationProperty
isLoggingEnabled :: Maybe (Value Bool)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::OSIS::Pipeline.LogPublishingOptions",
         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
"CloudWatchLogDestination"
                              (CloudWatchLogDestinationProperty -> (Key, Value))
-> Maybe CloudWatchLogDestinationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchLogDestinationProperty
cloudWatchLogDestination,
                            Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IsLoggingEnabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
isLoggingEnabled])}
instance JSON.ToJSON LogPublishingOptionsProperty where
  toJSON :: LogPublishingOptionsProperty -> Value
toJSON LogPublishingOptionsProperty {Maybe (Value Bool)
Maybe CloudWatchLogDestinationProperty
()
haddock_workaround_ :: LogPublishingOptionsProperty -> ()
cloudWatchLogDestination :: LogPublishingOptionsProperty
-> Maybe CloudWatchLogDestinationProperty
isLoggingEnabled :: LogPublishingOptionsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
cloudWatchLogDestination :: Maybe CloudWatchLogDestinationProperty
isLoggingEnabled :: Maybe (Value Bool)
..}
    = [(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
"CloudWatchLogDestination"
                 (CloudWatchLogDestinationProperty -> (Key, Value))
-> Maybe CloudWatchLogDestinationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchLogDestinationProperty
cloudWatchLogDestination,
               Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IsLoggingEnabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
isLoggingEnabled]))
instance Property "CloudWatchLogDestination" LogPublishingOptionsProperty where
  type PropertyType "CloudWatchLogDestination" LogPublishingOptionsProperty = CloudWatchLogDestinationProperty
  set :: PropertyType
  "CloudWatchLogDestination" LogPublishingOptionsProperty
-> LogPublishingOptionsProperty -> LogPublishingOptionsProperty
set PropertyType
  "CloudWatchLogDestination" LogPublishingOptionsProperty
newValue LogPublishingOptionsProperty {Maybe (Value Bool)
Maybe CloudWatchLogDestinationProperty
()
haddock_workaround_ :: LogPublishingOptionsProperty -> ()
cloudWatchLogDestination :: LogPublishingOptionsProperty
-> Maybe CloudWatchLogDestinationProperty
isLoggingEnabled :: LogPublishingOptionsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
cloudWatchLogDestination :: Maybe CloudWatchLogDestinationProperty
isLoggingEnabled :: Maybe (Value Bool)
..}
    = LogPublishingOptionsProperty
        {cloudWatchLogDestination :: Maybe CloudWatchLogDestinationProperty
cloudWatchLogDestination = CloudWatchLogDestinationProperty
-> Maybe CloudWatchLogDestinationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CloudWatchLogDestination" LogPublishingOptionsProperty
CloudWatchLogDestinationProperty
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
isLoggingEnabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
isLoggingEnabled :: Maybe (Value Bool)
..}
instance Property "IsLoggingEnabled" LogPublishingOptionsProperty where
  type PropertyType "IsLoggingEnabled" LogPublishingOptionsProperty = Value Prelude.Bool
  set :: PropertyType "IsLoggingEnabled" LogPublishingOptionsProperty
-> LogPublishingOptionsProperty -> LogPublishingOptionsProperty
set PropertyType "IsLoggingEnabled" LogPublishingOptionsProperty
newValue LogPublishingOptionsProperty {Maybe (Value Bool)
Maybe CloudWatchLogDestinationProperty
()
haddock_workaround_ :: LogPublishingOptionsProperty -> ()
cloudWatchLogDestination :: LogPublishingOptionsProperty
-> Maybe CloudWatchLogDestinationProperty
isLoggingEnabled :: LogPublishingOptionsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
cloudWatchLogDestination :: Maybe CloudWatchLogDestinationProperty
isLoggingEnabled :: Maybe (Value Bool)
..}
    = LogPublishingOptionsProperty
        {isLoggingEnabled :: Maybe (Value Bool)
isLoggingEnabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IsLoggingEnabled" LogPublishingOptionsProperty
Value Bool
newValue, Maybe CloudWatchLogDestinationProperty
()
haddock_workaround_ :: ()
cloudWatchLogDestination :: Maybe CloudWatchLogDestinationProperty
haddock_workaround_ :: ()
cloudWatchLogDestination :: Maybe CloudWatchLogDestinationProperty
..}