module Stratosphere.MediaLive.Channel.UdpContainerSettingsProperty (
        module Exports, UdpContainerSettingsProperty(..),
        mkUdpContainerSettingsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MediaLive.Channel.M2tsSettingsProperty as Exports
import Stratosphere.ResourceProperties
data UdpContainerSettingsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-udpcontainersettings.html>
    UdpContainerSettingsProperty {UdpContainerSettingsProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-channel-udpcontainersettings.html#cfn-medialive-channel-udpcontainersettings-m2tssettings>
                                  UdpContainerSettingsProperty -> Maybe M2tsSettingsProperty
m2tsSettings :: (Prelude.Maybe M2tsSettingsProperty)}
  deriving stock (UdpContainerSettingsProperty
-> UdpContainerSettingsProperty -> Bool
(UdpContainerSettingsProperty
 -> UdpContainerSettingsProperty -> Bool)
-> (UdpContainerSettingsProperty
    -> UdpContainerSettingsProperty -> Bool)
-> Eq UdpContainerSettingsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UdpContainerSettingsProperty
-> UdpContainerSettingsProperty -> Bool
== :: UdpContainerSettingsProperty
-> UdpContainerSettingsProperty -> Bool
$c/= :: UdpContainerSettingsProperty
-> UdpContainerSettingsProperty -> Bool
/= :: UdpContainerSettingsProperty
-> UdpContainerSettingsProperty -> Bool
Prelude.Eq, Int -> UdpContainerSettingsProperty -> ShowS
[UdpContainerSettingsProperty] -> ShowS
UdpContainerSettingsProperty -> String
(Int -> UdpContainerSettingsProperty -> ShowS)
-> (UdpContainerSettingsProperty -> String)
-> ([UdpContainerSettingsProperty] -> ShowS)
-> Show UdpContainerSettingsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UdpContainerSettingsProperty -> ShowS
showsPrec :: Int -> UdpContainerSettingsProperty -> ShowS
$cshow :: UdpContainerSettingsProperty -> String
show :: UdpContainerSettingsProperty -> String
$cshowList :: [UdpContainerSettingsProperty] -> ShowS
showList :: [UdpContainerSettingsProperty] -> ShowS
Prelude.Show)
mkUdpContainerSettingsProperty :: UdpContainerSettingsProperty
mkUdpContainerSettingsProperty :: UdpContainerSettingsProperty
mkUdpContainerSettingsProperty
  = UdpContainerSettingsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), m2tsSettings :: Maybe M2tsSettingsProperty
m2tsSettings = Maybe M2tsSettingsProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties UdpContainerSettingsProperty where
  toResourceProperties :: UdpContainerSettingsProperty -> ResourceProperties
toResourceProperties UdpContainerSettingsProperty {Maybe M2tsSettingsProperty
()
haddock_workaround_ :: UdpContainerSettingsProperty -> ()
m2tsSettings :: UdpContainerSettingsProperty -> Maybe M2tsSettingsProperty
haddock_workaround_ :: ()
m2tsSettings :: Maybe M2tsSettingsProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaLive::Channel.UdpContainerSettings",
         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 -> M2tsSettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"M2tsSettings" (M2tsSettingsProperty -> (Key, Value))
-> Maybe M2tsSettingsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe M2tsSettingsProperty
m2tsSettings])}
instance JSON.ToJSON UdpContainerSettingsProperty where
  toJSON :: UdpContainerSettingsProperty -> Value
toJSON UdpContainerSettingsProperty {Maybe M2tsSettingsProperty
()
haddock_workaround_ :: UdpContainerSettingsProperty -> ()
m2tsSettings :: UdpContainerSettingsProperty -> Maybe M2tsSettingsProperty
haddock_workaround_ :: ()
m2tsSettings :: Maybe M2tsSettingsProperty
..}
    = [(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 -> M2tsSettingsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"M2tsSettings" (M2tsSettingsProperty -> (Key, Value))
-> Maybe M2tsSettingsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe M2tsSettingsProperty
m2tsSettings]))
instance Property "M2tsSettings" UdpContainerSettingsProperty where
  type PropertyType "M2tsSettings" UdpContainerSettingsProperty = M2tsSettingsProperty
  set :: PropertyType "M2tsSettings" UdpContainerSettingsProperty
-> UdpContainerSettingsProperty -> UdpContainerSettingsProperty
set PropertyType "M2tsSettings" UdpContainerSettingsProperty
newValue UdpContainerSettingsProperty {Maybe M2tsSettingsProperty
()
haddock_workaround_ :: UdpContainerSettingsProperty -> ()
m2tsSettings :: UdpContainerSettingsProperty -> Maybe M2tsSettingsProperty
haddock_workaround_ :: ()
m2tsSettings :: Maybe M2tsSettingsProperty
..}
    = UdpContainerSettingsProperty
        {m2tsSettings :: Maybe M2tsSettingsProperty
m2tsSettings = M2tsSettingsProperty -> Maybe M2tsSettingsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "M2tsSettings" UdpContainerSettingsProperty
M2tsSettingsProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}