module Stratosphere.KinesisFirehose.DeliveryStream.CloudWatchLoggingOptionsProperty (
        CloudWatchLoggingOptionsProperty(..),
        mkCloudWatchLoggingOptionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CloudWatchLoggingOptionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-cloudwatchloggingoptions.html>
    CloudWatchLoggingOptionsProperty {CloudWatchLoggingOptionsProperty -> ()
haddock_workaround_ :: (),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-cloudwatchloggingoptions.html#cfn-kinesisfirehose-deliverystream-cloudwatchloggingoptions-enabled>
                                      CloudWatchLoggingOptionsProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-cloudwatchloggingoptions.html#cfn-kinesisfirehose-deliverystream-cloudwatchloggingoptions-loggroupname>
                                      CloudWatchLoggingOptionsProperty -> Maybe (Value Text)
logGroupName :: (Prelude.Maybe (Value Prelude.Text)),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-cloudwatchloggingoptions.html#cfn-kinesisfirehose-deliverystream-cloudwatchloggingoptions-logstreamname>
                                      CloudWatchLoggingOptionsProperty -> Maybe (Value Text)
logStreamName :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CloudWatchLoggingOptionsProperty
-> CloudWatchLoggingOptionsProperty -> Bool
(CloudWatchLoggingOptionsProperty
 -> CloudWatchLoggingOptionsProperty -> Bool)
-> (CloudWatchLoggingOptionsProperty
    -> CloudWatchLoggingOptionsProperty -> Bool)
-> Eq CloudWatchLoggingOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CloudWatchLoggingOptionsProperty
-> CloudWatchLoggingOptionsProperty -> Bool
== :: CloudWatchLoggingOptionsProperty
-> CloudWatchLoggingOptionsProperty -> Bool
$c/= :: CloudWatchLoggingOptionsProperty
-> CloudWatchLoggingOptionsProperty -> Bool
/= :: CloudWatchLoggingOptionsProperty
-> CloudWatchLoggingOptionsProperty -> Bool
Prelude.Eq, Int -> CloudWatchLoggingOptionsProperty -> ShowS
[CloudWatchLoggingOptionsProperty] -> ShowS
CloudWatchLoggingOptionsProperty -> String
(Int -> CloudWatchLoggingOptionsProperty -> ShowS)
-> (CloudWatchLoggingOptionsProperty -> String)
-> ([CloudWatchLoggingOptionsProperty] -> ShowS)
-> Show CloudWatchLoggingOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CloudWatchLoggingOptionsProperty -> ShowS
showsPrec :: Int -> CloudWatchLoggingOptionsProperty -> ShowS
$cshow :: CloudWatchLoggingOptionsProperty -> String
show :: CloudWatchLoggingOptionsProperty -> String
$cshowList :: [CloudWatchLoggingOptionsProperty] -> ShowS
showList :: [CloudWatchLoggingOptionsProperty] -> ShowS
Prelude.Show)
mkCloudWatchLoggingOptionsProperty ::
  CloudWatchLoggingOptionsProperty
mkCloudWatchLoggingOptionsProperty :: CloudWatchLoggingOptionsProperty
mkCloudWatchLoggingOptionsProperty
  = CloudWatchLoggingOptionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       logGroupName :: Maybe (Value Text)
logGroupName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, logStreamName :: Maybe (Value Text)
logStreamName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CloudWatchLoggingOptionsProperty where
  toResourceProperties :: CloudWatchLoggingOptionsProperty -> ResourceProperties
toResourceProperties CloudWatchLoggingOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CloudWatchLoggingOptionsProperty -> ()
enabled :: CloudWatchLoggingOptionsProperty -> Maybe (Value Bool)
logGroupName :: CloudWatchLoggingOptionsProperty -> Maybe (Value Text)
logStreamName :: CloudWatchLoggingOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
logGroupName :: Maybe (Value Text)
logStreamName :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::KinesisFirehose::DeliveryStream.CloudWatchLoggingOptions",
         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 -> 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
"Enabled" (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)
enabled,
                            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
"LogGroupName" (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)
logGroupName,
                            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
"LogStreamName" (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)
logStreamName])}
instance JSON.ToJSON CloudWatchLoggingOptionsProperty where
  toJSON :: CloudWatchLoggingOptionsProperty -> Value
toJSON CloudWatchLoggingOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CloudWatchLoggingOptionsProperty -> ()
enabled :: CloudWatchLoggingOptionsProperty -> Maybe (Value Bool)
logGroupName :: CloudWatchLoggingOptionsProperty -> Maybe (Value Text)
logStreamName :: CloudWatchLoggingOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
logGroupName :: Maybe (Value Text)
logStreamName :: Maybe (Value Text)
..}
    = [(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 -> 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
"Enabled" (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)
enabled,
               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
"LogGroupName" (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)
logGroupName,
               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
"LogStreamName" (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)
logStreamName]))
instance Property "Enabled" CloudWatchLoggingOptionsProperty where
  type PropertyType "Enabled" CloudWatchLoggingOptionsProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" CloudWatchLoggingOptionsProperty
-> CloudWatchLoggingOptionsProperty
-> CloudWatchLoggingOptionsProperty
set PropertyType "Enabled" CloudWatchLoggingOptionsProperty
newValue CloudWatchLoggingOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CloudWatchLoggingOptionsProperty -> ()
enabled :: CloudWatchLoggingOptionsProperty -> Maybe (Value Bool)
logGroupName :: CloudWatchLoggingOptionsProperty -> Maybe (Value Text)
logStreamName :: CloudWatchLoggingOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
logGroupName :: Maybe (Value Text)
logStreamName :: Maybe (Value Text)
..}
    = CloudWatchLoggingOptionsProperty
        {enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" CloudWatchLoggingOptionsProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
logGroupName :: Maybe (Value Text)
logStreamName :: Maybe (Value Text)
haddock_workaround_ :: ()
logGroupName :: Maybe (Value Text)
logStreamName :: Maybe (Value Text)
..}
instance Property "LogGroupName" CloudWatchLoggingOptionsProperty where
  type PropertyType "LogGroupName" CloudWatchLoggingOptionsProperty = Value Prelude.Text
  set :: PropertyType "LogGroupName" CloudWatchLoggingOptionsProperty
-> CloudWatchLoggingOptionsProperty
-> CloudWatchLoggingOptionsProperty
set PropertyType "LogGroupName" CloudWatchLoggingOptionsProperty
newValue CloudWatchLoggingOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CloudWatchLoggingOptionsProperty -> ()
enabled :: CloudWatchLoggingOptionsProperty -> Maybe (Value Bool)
logGroupName :: CloudWatchLoggingOptionsProperty -> Maybe (Value Text)
logStreamName :: CloudWatchLoggingOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
logGroupName :: Maybe (Value Text)
logStreamName :: Maybe (Value Text)
..}
    = CloudWatchLoggingOptionsProperty
        {logGroupName :: Maybe (Value Text)
logGroupName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LogGroupName" CloudWatchLoggingOptionsProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
logStreamName :: Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
logStreamName :: Maybe (Value Text)
..}
instance Property "LogStreamName" CloudWatchLoggingOptionsProperty where
  type PropertyType "LogStreamName" CloudWatchLoggingOptionsProperty = Value Prelude.Text
  set :: PropertyType "LogStreamName" CloudWatchLoggingOptionsProperty
-> CloudWatchLoggingOptionsProperty
-> CloudWatchLoggingOptionsProperty
set PropertyType "LogStreamName" CloudWatchLoggingOptionsProperty
newValue CloudWatchLoggingOptionsProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CloudWatchLoggingOptionsProperty -> ()
enabled :: CloudWatchLoggingOptionsProperty -> Maybe (Value Bool)
logGroupName :: CloudWatchLoggingOptionsProperty -> Maybe (Value Text)
logStreamName :: CloudWatchLoggingOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
logGroupName :: Maybe (Value Text)
logStreamName :: Maybe (Value Text)
..}
    = CloudWatchLoggingOptionsProperty
        {logStreamName :: Maybe (Value Text)
logStreamName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LogStreamName" CloudWatchLoggingOptionsProperty
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
logGroupName :: Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
logGroupName :: Maybe (Value Text)
..}