module Stratosphere.MediaPackage.Channel.LogConfigurationProperty (
        LogConfigurationProperty(..), mkLogConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LogConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-logconfiguration.html>
    LogConfigurationProperty {LogConfigurationProperty -> ()
haddock_workaround_ :: (),
                              -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mediapackage-channel-logconfiguration.html#cfn-mediapackage-channel-logconfiguration-loggroupname>
                              LogConfigurationProperty -> Maybe (Value Text)
logGroupName :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (LogConfigurationProperty -> LogConfigurationProperty -> Bool
(LogConfigurationProperty -> LogConfigurationProperty -> Bool)
-> (LogConfigurationProperty -> LogConfigurationProperty -> Bool)
-> Eq LogConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LogConfigurationProperty -> LogConfigurationProperty -> Bool
== :: LogConfigurationProperty -> LogConfigurationProperty -> Bool
$c/= :: LogConfigurationProperty -> LogConfigurationProperty -> Bool
/= :: LogConfigurationProperty -> LogConfigurationProperty -> Bool
Prelude.Eq, Int -> LogConfigurationProperty -> ShowS
[LogConfigurationProperty] -> ShowS
LogConfigurationProperty -> String
(Int -> LogConfigurationProperty -> ShowS)
-> (LogConfigurationProperty -> String)
-> ([LogConfigurationProperty] -> ShowS)
-> Show LogConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LogConfigurationProperty -> ShowS
showsPrec :: Int -> LogConfigurationProperty -> ShowS
$cshow :: LogConfigurationProperty -> String
show :: LogConfigurationProperty -> String
$cshowList :: [LogConfigurationProperty] -> ShowS
showList :: [LogConfigurationProperty] -> ShowS
Prelude.Show)
mkLogConfigurationProperty :: LogConfigurationProperty
mkLogConfigurationProperty :: LogConfigurationProperty
mkLogConfigurationProperty
  = LogConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), logGroupName :: Maybe (Value Text)
logGroupName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LogConfigurationProperty where
  toResourceProperties :: LogConfigurationProperty -> ResourceProperties
toResourceProperties LogConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: LogConfigurationProperty -> ()
logGroupName :: LogConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
logGroupName :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaPackage::Channel.LogConfiguration",
         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 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])}
instance JSON.ToJSON LogConfigurationProperty where
  toJSON :: LogConfigurationProperty -> Value
toJSON LogConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: LogConfigurationProperty -> ()
logGroupName :: LogConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
logGroupName :: 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 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]))
instance Property "LogGroupName" LogConfigurationProperty where
  type PropertyType "LogGroupName" LogConfigurationProperty = Value Prelude.Text
  set :: PropertyType "LogGroupName" LogConfigurationProperty
-> LogConfigurationProperty -> LogConfigurationProperty
set PropertyType "LogGroupName" LogConfigurationProperty
newValue LogConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: LogConfigurationProperty -> ()
logGroupName :: LogConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
logGroupName :: Maybe (Value Text)
..}
    = LogConfigurationProperty
        {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" LogConfigurationProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}